aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-06 10:03:59 +0100
committerSven Gothel <[email protected]>2015-03-06 10:03:59 +0100
commit23f7addf6eefde27efe7e47c320ad31b7f81dc2c (patch)
tree354c1cb7a88f82ad36b4856b05c2eb01e9923c7a /src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
parent27ebb38b9ffd3cc8f4ee3b97509b0f32ef2680aa (diff)
Bug 1135 - Cleanup: Class ownership change of static GL enumerates
GLBufferStateTracker now also supports GL4.GL_QUERY_BUFFER
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
index 27571ae0d..54a552f33 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -60,6 +60,7 @@ import com.jogamp.nativewindow.util.DimensionImmutable;
import com.jogamp.nativewindow.util.PixelFormat;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2;
+import com.jogamp.opengl.GL2ES3;
import com.jogamp.opengl.GL2GL3;
import com.jogamp.opengl.GLContext;
import com.jogamp.opengl.GLException;
@@ -597,9 +598,9 @@ public class TextureIO {
final GL2GL3 gl = _gl.getGL2GL3();
texture.bind(gl);
- final int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_INTERNAL_FORMAT);
- final int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_WIDTH);
- final int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_HEIGHT);
+ final int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2ES3.GL_TEXTURE_INTERNAL_FORMAT);
+ final int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2ES3.GL_TEXTURE_WIDTH);
+ final int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2ES3.GL_TEXTURE_HEIGHT);
final int border = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_BORDER);
TextureData data = null;
if (internalFormat == GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
@@ -617,7 +618,7 @@ public class TextureIO {
int fetchedFormat = 0;
switch (internalFormat) {
case GL.GL_RGB:
- case GL2GL3.GL_BGR:
+ case GL.GL_BGR:
case GL.GL_RGB8:
bytesPerPixel = 3;
fetchedFormat = GL.GL_RGB;
@@ -1303,7 +1304,7 @@ public class TextureIO {
final int pixelType = pixelAttribs.type;
if ((pixelFormat == GL.GL_RGB ||
pixelFormat == GL.GL_RGBA ||
- pixelFormat == GL2GL3.GL_BGR ||
+ pixelFormat == GL.GL_BGR ||
pixelFormat == GL.GL_BGRA ) &&
(pixelType == GL.GL_BYTE ||
pixelType == GL.GL_UNSIGNED_BYTE)) {