aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
index f512a3aae..1c6e97450 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
@@ -46,35 +46,35 @@ public class GLPixelStorageModes {
/** Create instance w/o {@link #save(GL)} */
public GLPixelStorageModes() {}
-
+
/** Create instance w/ {@link #save(GL)} */
public GLPixelStorageModes(GL gl) { save(gl); }
-
+
/**
* Sets the {@link GL#GL_PACK_ALIGNMENT}.
- * <p>
+ * <p>
* Saves the pixel storage modes if not saved yet.
* </p>
*/
public final void setPackAlignment(GL gl, int packAlignment) {
save(gl);
- gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
}
/**
* Sets the {@link GL#GL_UNPACK_ALIGNMENT}.
- * <p>
+ * <p>
* Saves the pixel storage modes if not saved yet.
* </p>
*/
public final void setUnpackAlignment(GL gl, int unpackAlignment) {
save(gl);
- gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, unpackAlignment);
+ gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, unpackAlignment);
}
-
+
/**
- * Sets the {@link GL#GL_PACK_ALIGNMENT} and {@link GL#GL_UNPACK_ALIGNMENT}.
- * <p>
+ * Sets the {@link GL#GL_PACK_ALIGNMENT} and {@link GL#GL_UNPACK_ALIGNMENT}.
+ * <p>
* Saves the pixel storage modes if not saved yet.
* </p>
*/
@@ -82,32 +82,32 @@ public class GLPixelStorageModes {
setPackAlignment(gl, packAlignment);
setUnpackAlignment(gl, unpackAlignment);
}
-
+
/**
* Sets the {@link GL2ES3#GL_PACK_ROW_LENGTH}.
- * <p>
+ * <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);
+ gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, packRowLength);
}
/**
* Sets the {@link GL2ES2#GL_UNPACK_ROW_LENGTH}.
- * <p>
+ * <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);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, unpackRowLength);
}
-
+
/**
* Sets the {@link GL2ES3#GL_PACK_ROW_LENGTH} and {@link GL2ES2#GL_UNPACK_ROW_LENGTH}.
- * <p>
+ * <p>
* Saves the pixel storage modes if not saved yet.
* </p>
*/
@@ -115,7 +115,7 @@ public class GLPixelStorageModes {
setPackRowLength(gl, packRowLength);
setUnpackRowLength(gl, unpackRowLength);
}
-
+
/**
* Save the pixel storage mode, if not saved yet.
* <p>
@@ -126,8 +126,8 @@ public class GLPixelStorageModes {
if(saved) {
return;
}
-
- if(gl.isGL2GL3()) {
+
+ if(gl.isGL2GL3()) {
if(gl.isGL2()) {
gl.getGL2().glPushClientAttrib(GL2.GL_CLIENT_PIXEL_STORE_BIT);
} else {
@@ -154,7 +154,7 @@ public class GLPixelStorageModes {
// embedded deals with pack/unpack alignment only
gl.glGetIntegerv(GL2ES2.GL_PACK_ALIGNMENT, savedAlignment, 0);
gl.glGetIntegerv(GL2ES2.GL_UNPACK_ALIGNMENT, savedAlignment, 1);
- }
+ }
saved = true;
}
@@ -166,8 +166,8 @@ public class GLPixelStorageModes {
if(!saved) {
throw new GLException("pixel storage modes not saved");
}
-
- if(gl.isGL2GL3()) {
+
+ if(gl.isGL2GL3()) {
if(gl.isGL2()) {
gl.getGL2().glPopClientAttrib();
} else {
@@ -186,9 +186,9 @@ public class GLPixelStorageModes {
// embedded deals with pack/unpack alignment only
gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, savedAlignment[0]);
gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, savedAlignment[1]);
- }
+ }
saved = false;
- }
+ }
}