mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
more with method naming, add XML hasChildren() method
This commit is contained in:
@@ -7210,6 +7210,16 @@ public class PApplet extends Activity implements PConstants, Runnable {
|
||||
}
|
||||
|
||||
|
||||
public PGL beginGL() {
|
||||
return g.beginGL();
|
||||
}
|
||||
|
||||
|
||||
public void endGL() {
|
||||
g.endGL();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enable a hint option.
|
||||
* <P>
|
||||
|
||||
@@ -25,6 +25,7 @@ package processing.core;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import processing.opengl.PGL;
|
||||
import processing.opengl.PShader;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
@@ -675,6 +676,17 @@ public class PGraphics extends PImage implements PConstants {
|
||||
public void flush() {
|
||||
// no-op, mostly for P3D to write sorted stuff
|
||||
}
|
||||
|
||||
|
||||
public PGL beginGL() {
|
||||
showMethodWarning("beginGL");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void endGL() {
|
||||
showMethodWarning("endGL");
|
||||
}
|
||||
|
||||
|
||||
protected void checkSettings() {
|
||||
|
||||
@@ -238,6 +238,12 @@ public class XML implements Serializable {
|
||||
checkChildren();
|
||||
return children.length;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasChildren() {
|
||||
checkChildren();
|
||||
return children.length > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1729,18 +1729,18 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
public PGL beginPGL() {
|
||||
public PGL beginGL() {
|
||||
flush();
|
||||
return pgl;
|
||||
}
|
||||
|
||||
|
||||
public void endPGL() {
|
||||
public void endGL() {
|
||||
restoreGL();
|
||||
}
|
||||
|
||||
|
||||
public void restartPGL() {
|
||||
protected void restartPGL() {
|
||||
pgl.initialized = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user