diff options
author | Sven Gothel <[email protected]> | 2013-09-03 15:26:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-03 15:26:35 +0200 |
commit | 33345ad2e7112ea6cf87b5c69fba0587553c8e3b (patch) | |
tree | 08a7eae760ac86b0bf946c40af2549810738548e /src/jogl/classes/com/jogamp/opengl | |
parent | 4455e56f4f9294fe50cafabc6d08867bb82c416f (diff) |
GLPixelStorageModes: Fix API doc references, Add set[Pack|Unpack]RowLength(GL2ES3 gl, ..)
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java | 44 |
1 files changed, 39 insertions, 5 deletions
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}. * <p> * Saves the pixel storage modes if not saved yet. * </p> */ 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}. * <p> * Saves the pixel storage modes if not saved yet. * </p> */ 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}. * <p> * Saves the pixel storage modes if not saved yet. * </p> @@ -83,6 +84,39 @@ public class GLPixelStorageModes { } /** + * Sets the {@link GL2ES3#GL_PACK_ROW_LENGTH}. + * <p> + * Saves the pixel storage modes if not saved yet. + * </p> + */ + 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}. + * <p> + * Saves the pixel storage modes if not saved yet. + * </p> + */ + 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}. + * <p> + * Saves the pixel storage modes if not saved yet. + * </p> + */ + 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. * <p> * Restore via {@link #restore(GL)} |