aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-09 21:02:55 +0200
committerSven Gothel <[email protected]>2014-09-09 21:02:55 +0200
commit6363fccee219ce238b0b2ded39c116e2bc8613d5 (patch)
treebb5ccfec359828026088a109ba9d7ea954efcdf6 /src/jogl
parentacda710ea5dfffc236c5f4b47e7e8e1fe492cc8a (diff)
GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei states
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
index e3069c29b..d4ab4e4f4 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
@@ -373,25 +373,29 @@ public class GLBuffers extends Buffers {
if (pack) {
alignment = glGetInteger(gl, GL.GL_PACK_ALIGNMENT, tmp);
- if(gl.isGL2GL3()) {
+ if( gl.isGL2ES3() ) {
rowLength = glGetInteger(gl, GL2ES3.GL_PACK_ROW_LENGTH, tmp);
skipRows = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_ROWS, tmp);
skipPixels = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_PIXELS, tmp);
- if (depth > 1 && gl.getContext().getGLVersionNumber().compareTo(GLContext.Version120) >= 0 ) {
+ if (depth > 1 && gl.isGL2GL3() && gl.getContext().getGLVersionNumber().compareTo(GLContext.Version120) >= 0 ) {
imageHeight = glGetInteger(gl, GL2GL3.GL_PACK_IMAGE_HEIGHT, tmp);
skipImages = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_IMAGES, tmp);
}
}
} else {
alignment = glGetInteger(gl, GL.GL_UNPACK_ALIGNMENT, tmp);
- if(gl.isGL2GL3 ()) {
+ if( gl.isGL2ES3() ) {
rowLength = glGetInteger(gl, GL2ES2.GL_UNPACK_ROW_LENGTH, tmp);
skipRows = glGetInteger(gl, GL2ES2.GL_UNPACK_SKIP_ROWS, tmp);
skipPixels = glGetInteger(gl, GL2ES2.GL_UNPACK_SKIP_PIXELS, tmp);
- if (depth > 1 && gl.getContext().getGLVersionNumber().compareTo(GLContext.Version120) >= 0 ) {
+ if( depth > 1 &&
+ ( gl.isGL3ES3() ||
+ ( gl.isGL2GL3() && gl.getContext().getGLVersionNumber().compareTo(GLContext.Version120) >= 0 )
+ )
+ ) {
imageHeight = glGetInteger(gl, GL2ES3.GL_UNPACK_IMAGE_HEIGHT, tmp);
skipImages = glGetInteger(gl, GL2ES3.GL_UNPACK_SKIP_IMAGES, tmp);
- }
+ }
}
}