aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java11
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java6
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java3
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java9
4 files changed, 15 insertions, 14 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
index 092e2abf0..e85f04092 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
@@ -46,20 +46,13 @@ public class AWTGLReadBufferUtil extends GLReadBufferUtil {
* @param alpha
*/
public AWTGLReadBufferUtil(GLProfile glp, boolean alpha) {
- super(new AWTGLPixelBuffer.AWTGLPixelBufferProvider( glp.isGL2GL3() || glp.isGL3ES3() /* allowRowStride */ ), alpha, false);
+ super(new AWTGLPixelBuffer.AWTGLPixelBufferProvider( glp.isGL2ES3() /* allowRowStride */ ), alpha, false);
}
public AWTGLPixelBuffer getAWTGLPixelBuffer() { return (AWTGLPixelBuffer)this.getPixelBuffer(); }
public BufferedImage readPixelsToBufferedImage(GL gl, boolean awtOrientation) {
- if( readPixels(gl, awtOrientation) ) {
- final BufferedImage image = getAWTGLPixelBuffer().image;
- if( getTextureData().getMustFlipVertically() ) {
- ImageUtil.flipImageVertically(image);
- }
- return image;
- }
- return null;
+ return readPixelsToBufferedImage(gl, 0, 0, 0, 0, awtOrientation);
}
public BufferedImage readPixelsToBufferedImage(GL gl, int inX, int inY, int inWidth, int inHeight, boolean awtOrientation) {
if( readPixels(gl, inX, inY, inWidth, inHeight, awtOrientation) ) {
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 df8ac5934..3748cd336 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -1125,7 +1125,7 @@ public class TextureIO {
pixelFormat = image.getGLFormat();
}
if (internalFormat == 0) {
- if(glp.isGL2GL3()) {
+ if(glp.isGL2ES3()) {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA8:GL.GL_RGB8;
} else {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA:GL.GL_RGB;
@@ -1162,7 +1162,7 @@ public class TextureIO {
pixelFormat = image.getGLFormat();
}
if (internalFormat == 0) {
- if(glp.isGL2GL3()) {
+ if(glp.isGL2ES3()) {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA8:GL.GL_RGB8;
} else {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA:GL.GL_RGB;
@@ -1199,7 +1199,7 @@ public class TextureIO {
pixelFormat = image.getGLFormat();
}
if (internalFormat == 0) {
- if(glp.isGL2GL3()) {
+ if(glp.isGL2ES3()) {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA8:GL.GL_RGB8;
} else {
internalFormat = (image.getBytesPerPixel()==4)?GL.GL_RGBA:GL.GL_RGB;
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index f6c03b537..618ee2584 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1115,8 +1115,7 @@ public abstract class GLContext {
/**
* Indicates whether this GLContext is capable of GL2ES3. <p>Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL3ES3, GL2, GL2GL3 ].</p>
- * @see GLProfile#isGL3ES3()
- * @see GLProfile#isGL2GL3()
+ * @see GLProfile#isGL2ES3()
*/
public final boolean isGL2ES3() {
return isGL3ES3() || isGL2GL3();
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index e3078271e..b5e89a23b 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1128,6 +1128,15 @@ public class GLProfile {
return GL2ES2 == profile || isGLES2() || isGL2GL3();
}
+ /**
+ * Indicates whether this profile is capable of GL2ES3. <p>Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL3ES3, GL2, GL2GL3 ].</p>
+ * @see isGL3ES3()
+ * @see isGL2GL3()
+ */
+ public final boolean isGL2ES3() {
+ return isGL3ES3() || isGL2GL3();
+ }
+
/** Indicates whether this profile is capable of GL3ES3. <p>Includes [ GL4bc, GL4, GL3bc, GL3, GLES3 ].</p> */
public final boolean isGL3ES3() {
return isGL4ES3() || isGL3();