aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index b7d2980df..25a012bb9 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -32,6 +32,7 @@ import java.io.File;
import java.io.IOException;
import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES3;
import javax.media.opengl.GL2GL3;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLDrawable;
@@ -221,8 +222,10 @@ public class GLReadBufferUtil {
boolean res = null!=readPixelBuffer && readPixelBuffer.isValid();
if(res) {
psm.setAlignment(gl, alignment, alignment);
- if(gl.isGL2GL3()) {
- gl.getGL2GL3().glPixelStorei(GL2GL3.GL_PACK_ROW_LENGTH, width);
+ if(gl.isGL2ES3()) {
+ final GL2ES3 gl2es3 = gl.getGL2ES3();
+ gl2es3.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, width);
+ gl2es3.glReadBuffer(gl2es3.getDefaultReadBuffer());
}
readPixelBuffer.clear();
try {