* Android - disable GL error check by default

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9141 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent b75a3415c5
commit 65c27304be
  1. 29
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java

@ -106,6 +106,7 @@ public class OGLESShaderRenderer implements Renderer {
private boolean powerOf2 = false; private boolean powerOf2 = false;
private boolean verboseLogging = false; private boolean verboseLogging = false;
private boolean useVBO = false; private boolean useVBO = false;
private boolean checkErrors = false;
public OGLESShaderRenderer() { public OGLESShaderRenderer() {
} }
@ -131,6 +132,19 @@ public class OGLESShaderRenderer implements Renderer {
nameBuf.rewind(); nameBuf.rewind();
} }
private void checkGLError() {
if (!checkErrors) return;
int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
throw new RendererException("OpenGL Error " + error);
}
}
private boolean log(String message) {
logger.info(message);
return true;
}
public Statistics getStatistics() { public Statistics getStatistics() {
return statistics; return statistics;
@ -990,7 +1004,7 @@ public class OGLESShaderRenderer implements Renderer {
logger.info("GLES20.glShaderSource(" + id + ")"); logger.info("GLES20.glShaderSource(" + id + ")");
} }
if (powerVr) { if (powerVr && source.getType() == ShaderType.Vertex) {
// XXX: This is to fix a bug in old PowerVR, remove // XXX: This is to fix a bug in old PowerVR, remove
// when no longer applicable. // when no longer applicable.
GLES20.glShaderSource( GLES20.glShaderSource(
@ -2751,19 +2765,6 @@ public class OGLESShaderRenderer implements Renderer {
// } // }
} }
private void checkGLError() {
int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
logger.log(Level.WARNING, "glError {0}", error);
// throw new RuntimeException("glError " + error);
}
}
private boolean log(String message) {
logger.info(message);
return true;
}
/** /**
* drawTriangleList_Array uses Vertex Array * drawTriangleList_Array uses Vertex Array
* @param indexBuf * @param indexBuf

Loading…
Cancel
Save