aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
index 55b31b692..afc57fa30 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
@@ -126,19 +126,21 @@ public class RandomTileRenderer extends TileRendererBase {
// be sure OpenGL rendering is finished
gl.glFlush();
- if( DEBUG ) {
- System.err.println("TileRenderer.end.0: "+this.toString());
- }
-
// save current glPixelStore values
psm.save(gl);
psm.setPackAlignment(gl, 1);
final GL2ES3 gl2es3;
+ final int readBuffer;
if( gl.isGL2ES3() ) {
gl2es3 = gl.getGL2ES3();
- gl2es3.glReadBuffer(gl2es3.getDefaultReadBuffer());
+ readBuffer = gl2es3.getDefaultReadBuffer();
+ gl2es3.glReadBuffer(readBuffer);
} else {
gl2es3 = null;
+ readBuffer = 0; // undef. probably default: GL_FRONT (single buffering) GL_BACK (double buffering)
+ }
+ if( DEBUG ) {
+ System.err.println("TileRenderer.end.0: readBuffer 0x"+Integer.toHexString(readBuffer)+", "+this.toString());
}
final int tmp[] = new int[1];