From a5e0661540b7dc6c10112ab8c0d3bc41a7b03080 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 22 Feb 2012 03:29:09 +0100 Subject: Minor GL/GLContext additions / cleanups (GL_BGRA, isNPOTTextureAvailable()) - Subsume GL_EXT_texture_format_BGRA8888 -> GL, Added GLContext.isTextureFormatBGRA8888Available() - Movied generic isNPOTTextureAvailable() from GL -> GLContext, used by GL (desktop), added simplified impl. in GLES1/GLES2 (false/true) --- src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java | 2 +- .../classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/util') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java index 4ab603576..32391c650 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java @@ -431,7 +431,7 @@ public class GLBuffers extends Buffers { break; case GL.GL_RGBA: case GL2GL3.GL_RGBA_INTEGER: - case GL2GL3.GL_BGRA: + case GL.GL_BGRA: case GL2GL3.GL_BGRA_INTEGER: case GL2.GL_ABGR_EXT: elements = 4; diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java index 39ec74b97..ad96a9939 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java @@ -180,7 +180,7 @@ public class AWTTextureData extends TextureData { if (glp.isGL2GL3()) { switch (image.getType()) { case BufferedImage.TYPE_INT_RGB: - pixelFormat = GL2GL3.GL_BGRA; + pixelFormat = GL.GL_BGRA; pixelType = GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV; rowLength = scanlineStride; alignment = 4; @@ -188,7 +188,7 @@ public class AWTTextureData extends TextureData { setupLazyCustomConversion(image); break; case BufferedImage.TYPE_INT_ARGB_PRE: - pixelFormat = GL2GL3.GL_BGRA; + pixelFormat = GL.GL_BGRA; pixelType = GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV; rowLength = scanlineStride; alignment = 4; @@ -254,7 +254,7 @@ public class AWTTextureData extends TextureData { setupLazyCustomConversion(image); break; case BufferedImage.TYPE_USHORT_555_RGB: - pixelFormat = GL2GL3.GL_BGRA; + pixelFormat = GL.GL_BGRA; pixelType = GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV; rowLength = scanlineStride; alignment = 2; -- cgit v1.2.3