diff options
author | Sven Gothel <[email protected]> | 2014-09-08 05:58:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-08 05:58:35 +0200 |
commit | f358c49418e95c622d50eb29f53c60dc4dbdee5b (patch) | |
tree | 2fd00b013b457cc86dfdd723be53de4771d48eee /src/jogl/classes/jogamp/opengl/glu/mipmap | |
parent | 101e229fa2f15b3492889205884ca98b1e9b3fbd (diff) |
Bug 1047 - jogamp.opengl.glu.mipmap.Mipmap now uses already parsed GL version number and GL profile selection
Since Bug 1047 didn't provide a unit tests, this must be fine for now.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/glu/mipmap')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java index 9ff6bd637..51d8ca6fe 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java @@ -49,6 +49,7 @@ import javax.media.opengl.GL2; import javax.media.opengl.GL2ES2; import javax.media.opengl.GL2ES3; import javax.media.opengl.GL2GL3; +import javax.media.opengl.GLContext; import javax.media.opengl.glu.GLU; import javax.media.opengl.GLException; @@ -255,8 +256,8 @@ public class Mipmap { */ public static void closestFit( final GL gl, final int target, final int width, final int height, final int internalFormat, final int format, final int type, final int[] newWidth, final int[] newHeight ) { - // Use proxy textures if OpenGL version >= 1.1 - if( Double.parseDouble( gl.glGetString( GL.GL_VERSION ).trim().substring( 0, 3 ) ) >= 1.1 ) { + // Use proxy textures if OpenGL GL2/GL3 version >= 1.1 + if( gl.isGL2GL3() && gl.getContext().getGLVersionNumber().compareTo(GLContext.Version110) >= 0 ) { int widthPowerOf2 = nearestPower( width ); int heightPowerOf2 = nearestPower( height ); final int[] proxyWidth = new int[1]; |