From fc1e98790a02b4fa7922f3cdd9d437f87d7c99e5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 26 May 2014 19:18:43 +0200 Subject: Bug 1010 - Fix ES3.glPixelStorei and revalidate GLPixelStorageModes Remove GLES3Impl.glPixelStorei pname validation which was true for ES2 impl, but is no more valid for ES3, which accepts more values than GL_PACK_ALIGNMENT & GL_UNPACK_ALIGNMENT. Revalidate GLPixelStorageModes: - Properly support ES3 PixelStorageModes - Revalidate PixelStorageModes for all GL profiles - Properly reset values at save - Separate PACK and UNPACK save/reset/restore implementation --- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/awt') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index c8102973f..e712f2fa2 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -1724,8 +1724,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing System.err.println(getThreadName()+": GLJPanel.OffscreenBackend.postGL.readPixels: - frameCount "+frameCount); } - // Save current modes - psm.setAlignment(gl, alignment, alignment); + // Save PACK modes, reset them to defaults and set alignment + psm.setPackAlignment(gl, alignment); if(gl.isGL2ES3()) { final GL2ES3 gl2es3 = gl.getGL2ES3(); gl2es3.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, panelWidth); -- cgit v1.2.3