more with method naming, add XML hasChildren() method

This commit is contained in:
benfry
2012-07-22 00:20:16 +00:00
parent bae7fa5243
commit 26593bbf2f
4 changed files with 31 additions and 3 deletions

View File

@@ -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>

View File

@@ -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() {

View File

@@ -238,6 +238,12 @@ public class XML implements Serializable {
checkChildren();
return children.length;
}
public boolean hasChildren() {
checkChildren();
return children.length > 0;
}
/**

View File

@@ -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;
}