From 33345ad2e7112ea6cf87b5c69fba0587553c8e3b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 3 Sep 2013 15:26:35 +0200 Subject: GLPixelStorageModes: Fix API doc references, Add set[Pack|Unpack]RowLength(GL2ES3 gl, ..) --- .../jogamp/opengl/util/GLPixelStorageModes.java | 44 +++++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java index fab80b109..f512a3aae 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java @@ -31,6 +31,7 @@ package com.jogamp.opengl.util; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.GL2ES2; +import javax.media.opengl.GL2ES3; import javax.media.opengl.GL2GL3; import javax.media.opengl.GLException; @@ -50,29 +51,29 @@ public class GLPixelStorageModes { public GLPixelStorageModes(GL gl) { save(gl); } /** - * Sets the {@link GL2ES2.GL_PACK_ALIGNMENT}. + * Sets the {@link GL#GL_PACK_ALIGNMENT}. *

* Saves the pixel storage modes if not saved yet. *

*/ public final void setPackAlignment(GL gl, int packAlignment) { save(gl); - gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, packAlignment); + gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment); } /** - * Sets the {@link GL2ES2.GL_UNPACK_ALIGNMENT}. + * Sets the {@link GL#GL_UNPACK_ALIGNMENT}. *

* Saves the pixel storage modes if not saved yet. *

*/ public final void setUnpackAlignment(GL gl, int unpackAlignment) { save(gl); - gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, unpackAlignment); + gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, unpackAlignment); } /** - * Sets the {@link GL2ES2.GL_PACK_ALIGNMENT} and {@link GL2ES2.GL_UNPACK_ALIGNMENT}. + * Sets the {@link GL#GL_PACK_ALIGNMENT} and {@link GL#GL_UNPACK_ALIGNMENT}. *

* Saves the pixel storage modes if not saved yet. *

@@ -82,6 +83,39 @@ public class GLPixelStorageModes { setUnpackAlignment(gl, unpackAlignment); } + /** + * Sets the {@link GL2ES3#GL_PACK_ROW_LENGTH}. + *

+ * Saves the pixel storage modes if not saved yet. + *

+ */ + public final void setPackRowLength(GL2ES3 gl, int packRowLength) { + save(gl); + gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, packRowLength); + } + + /** + * Sets the {@link GL2ES2#GL_UNPACK_ROW_LENGTH}. + *

+ * Saves the pixel storage modes if not saved yet. + *

+ */ + public final void setUnpackRowLength(GL2ES2 gl, int unpackRowLength) { + save(gl); + gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, unpackRowLength); + } + + /** + * Sets the {@link GL2ES3#GL_PACK_ROW_LENGTH} and {@link GL2ES2#GL_UNPACK_ROW_LENGTH}. + *

+ * Saves the pixel storage modes if not saved yet. + *

+ */ + public final void setRowLength(GL2ES3 gl, int packRowLength, int unpackRowLength) { + setPackRowLength(gl, packRowLength); + setUnpackRowLength(gl, unpackRowLength); + } + /** * Save the pixel storage mode, if not saved yet. *

-- cgit v1.2.3