summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java2
-rwxr-xr-xsrc/jogl/classes/com/jogamp/opengl/util/texture/Texture.java28
-rwxr-xr-xsrc/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp8
-rwxr-xr-xsrc/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase8
4 files changed, 23 insertions, 23 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index 21f359f52..c7e845953 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -221,7 +221,7 @@ public class ShaderUtil {
v = true;
}
shaderCompilerAvailable = new Boolean(v);
- } else if( gl.isGL2() || gl.isGL2ES2() ) {
+ } else if( gl.isGL2ES2() ) {
shaderCompilerAvailable = new Boolean(true);
} else {
throw new GLException("Invalid OpenGL profile");
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
index 5ef96eeaf..57ac0d45a 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -487,7 +487,7 @@ public class Texture {
}
if (!done && preferTexRect(gl) && !isPOT &&
- haveTexRect(gl) && !data.isDataCompressed() && gl.isGL2()) {
+ haveTexRect(gl) && !data.isDataCompressed() && !gl.isGL3() && !gl.isGLES()) {
// GL_ARB_texture_rectangle does not work for compressed textures
if (DEBUG) {
System.err.println("Using GL_ARB_texture_rectangle preferentially on this hardware");
@@ -514,7 +514,7 @@ public class Texture {
done = true;
}
- if (!done && haveTexRect(gl) && !data.isDataCompressed() && gl.isGL2()) {
+ if (!done && haveTexRect(gl) && !data.isDataCompressed() && !gl.isGL3() && !gl.isGLES()) {
// GL_ARB_texture_rectangle does not work for compressed textures
if (DEBUG) {
System.err.println("Using GL_ARB_texture_rectangle");
@@ -1013,10 +1013,10 @@ public class Texture {
int[] skipRows = { 0 };
int[] skipPixels = { 0 };
gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, align, 0); // save alignment
- if(gl.isGL2()) {
- gl.glGetIntegerv(GL2.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
- gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
- gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
+ if(gl.isGL2GL3()) {
+ gl.glGetIntegerv(GL2GL3.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
+ gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
+ gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
}
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, data.getAlignment());
if (DEBUG && VERBOSE) {
@@ -1028,10 +1028,10 @@ public class Texture {
System.out.println("width = " + width);
System.out.println("height = " + height);
}
- if(gl.isGL2()) {
- gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowlen);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, srcy);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, srcx);
+ if(gl.isGL2GL3()) {
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH, rowlen);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS, srcy);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, srcx);
} else {
if ( rowlen!=0 && rowlen!=width &&
srcy!=0 && srcx!=0 ) {
@@ -1044,10 +1044,10 @@ public class Texture {
data.getPixelFormat(), data.getPixelType(),
buffer);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
- if(gl.isGL2()) {
- gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
+ if(gl.isGL2GL3()) {
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
}
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp
index d1eca7c69..6e6e4ab04 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javame_cdc_fp
@@ -308,8 +308,8 @@ public class TGAImage {
GL gl = GLContext.getCurrentGL();
if (header.pixelDepth() == 24) {
bpp=3;
- if(gl.isGL2()) {
- format = GL2.GL_BGR;
+ if(gl.isGL2GL3()) {
+ format = GL2GL3.GL_BGR;
} else {
format = GL.GL_RGB;
swapBGR(tmpData, rawWidth, header.height(), bpp);
@@ -318,8 +318,8 @@ public class TGAImage {
assert header.pixelDepth() == 32;
bpp=4;
- if(gl.isGL2()) {
- format = GL2.GL_BGRA;
+ if(gl.isGL2GL3()) {
+ format = GL2GL3.GL_BGRA;
} else {
format = GL.GL_RGBA;
swapBGR(tmpData, rawWidth, header.height(), bpp);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase
index 8575f553d..16ba538b5 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java.javase
@@ -310,8 +310,8 @@ public class TGAImage {
GL gl = GLContext.getCurrentGL();
if (header.pixelDepth() == 24) {
bpp=3;
- if(gl.isGL2()) {
- format = GL2.GL_BGR;
+ if(gl.isGL2GL3()) {
+ format = GL2GL3.GL_BGR;
} else {
format = GL.GL_RGB;
swapBGR(tmpData, rawWidth, header.height(), bpp);
@@ -320,8 +320,8 @@ public class TGAImage {
assert header.pixelDepth() == 32;
bpp=4;
- if(gl.isGL2()) {
- format = GL2.GL_BGRA;
+ if(gl.isGL2GL3()) {
+ format = GL2GL3.GL_BGRA;
} else {
format = GL.GL_RGBA;
swapBGR(tmpData, rawWidth, header.height(), bpp);