diff options
author | Sven Gothel <[email protected]> | 2014-02-14 06:19:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-14 06:19:35 +0100 |
commit | fb12b0b6fa37d3a4136bb04597b3c32b15832c82 (patch) | |
tree | 28d98769667996024c18b70aa8e5f1f4433b15fe /src/jogl/classes/com/jogamp/opengl/util | |
parent | d55fa82fe6f236523dd4f701a15057b1a0ca8e36 (diff) |
GLReadBufferUtil: Set PACK_ROW_LENGTH for ES3 as well - also set ReadBuffer to default.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java | 7 |
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 { |