summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-08-17 17:11:03 +0200
committerSven Gothel <[email protected]>2012-08-17 17:11:03 +0200
commitfe78d5095ef98215ce6c73d8912dfa19ae708bd0 (patch)
treee4d191894d42909e3fe79205a3b24d2ee3e91e6b /src/jogl/classes/com/jogamp/opengl/util
parentda697607fce1e6d2b0c65fcc37030c88981b76ec (diff)
Robostness FBObject / GLReadBufferUtil: Ignore pre-existing GL errors - remove GL error checking in FBObject bind/unbind.
- User GL code caused errors shall not fail impl. - FBObject bind/unbind GL error checking is almost useless due to it's simple code, would only catch user GL code errors, which should be ignored here. - MultisampleDemoES2: Only enable GL_MULTISAMPLE if available, i.e. validate passed multisample flag
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index b0fae8a6d..34cc0eb07 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -116,6 +116,10 @@ public class GLReadBufferUtil {
* @see #GLReadBufferUtil(boolean, boolean)
*/
public boolean readPixels(GL gl, boolean flip) {
+ final int glerr0 = gl.glGetError();
+ if(GL.GL_NO_ERROR != glerr0) {
+ System.err.println("Info: GLReadBufferUtil.readPixels: pre-exisiting GL error 0x"+Integer.toHexString(glerr0));
+ }
final GLDrawable drawable = gl.getContext().getGLReadDrawable();
final int textureInternalFormat, textureDataFormat, textureDataType;
final int[] glImplColorReadVals = new int[] { 0, 0 };