summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLProfile.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-16 20:46:42 +0200
committerSven Gothel <[email protected]>2013-07-16 20:46:42 +0200
commit1a20ef3aa1dc9acedd7da0475ee19d4c40b18498 (patch)
tree491271ad5d447b8978c7d82494606653acf7afbd /src/jogl/classes/javax/media/opengl/GLProfile.java
parentdba2faf8520a43a809eb756869c6c97a0a2ef2cd (diff)
Redefine: isGLES3Compatible() and isGL4ES3(), i.e. allow GL4ES3 usage in case proper ES3_compat is given.
isGLES3Compatible() and isGL4ES3() of GLBase _and_ GLContext includes [ GL >= 4.3, GL >= 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]. Tested GL 'aliasing' w/ TestGLProfile01NEWT, i.e. isGL*() and getGL*().
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java85
1 files changed, 49 insertions, 36 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index c2a24e975..51b822449 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -299,13 +299,6 @@ public class GLProfile {
}
if(useIndent) {
- doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL4ES3").append(indent);
- } else {
- sb.append(", GL4ES3 ");
- }
- sb.append(isAvailableImpl(map, GL4ES3));
-
- if(useIndent) {
doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GLES3").append(indent);
} else {
sb.append(", GLES3 ");
@@ -350,13 +343,6 @@ public class GLProfile {
}
if(useIndent) {
- doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL2ES2").append(indent);
- } else {
- sb.append(", GL2ES2 ");
- }
- sb.append(isAvailableImpl(map, GL2ES2));
-
- if(useIndent) {
doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GLES2").append(indent);
} else {
sb.append(", GLES2 ");
@@ -368,13 +354,6 @@ public class GLProfile {
}
if(useIndent) {
- doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL2ES1").append(indent);
- } else {
- sb.append(", GL2ES1 ");
- }
- sb.append(isAvailableImpl(map, GL2ES1));
-
- if(useIndent) {
doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GLES1").append(indent);
} else {
sb.append(", GLES1 ");
@@ -386,6 +365,27 @@ public class GLProfile {
}
if(useIndent) {
+ doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL4ES3").append(indent);
+ } else {
+ sb.append(", GL4ES3 ");
+ }
+ sb.append(isAvailableImpl(map, GL4ES3));
+
+ if(useIndent) {
+ doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL2ES2").append(indent);
+ } else {
+ sb.append(", GL2ES2 ");
+ }
+ sb.append(isAvailableImpl(map, GL2ES2));
+
+ if(useIndent) {
+ doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("GL2ES1").append(indent);
+ } else {
+ sb.append(", GL2ES1 ");
+ }
+ sb.append(isAvailableImpl(map, GL2ES1));
+
+ if(useIndent) {
indentCount--;
doIndent(sb.append(Platform.getNewline()), indent, indentCount).append("Profiles");
indentCount++;
@@ -1922,24 +1922,37 @@ public class GLProfile {
return GLES2;
}
} else if (GL4ES3.equals(profile)) {
- final boolean es3HardwareRasterizer[] = new boolean[1];
- final boolean gles3Available = hasGLES3Impl && ( esCtxUndef || GLContext.isGLES3Available(device, es3HardwareRasterizer) );
- final boolean gles3HWAvailable = gles3Available && es3HardwareRasterizer[0] ;
- if(hasGL234Impl) {
- if(GLContext.isGL4Available(device, isHardwareRasterizer)) {
- if(!gles3HWAvailable || isHardwareRasterizer[0]) {
- return GL4;
+ final boolean gles3CompatAvail = GLContext.isGLES3CompatibleAvailable(device);
+ if( desktopCtxUndef || esCtxUndef || gles3CompatAvail ) {
+ final boolean es3HardwareRasterizer[] = new boolean[1];
+ final boolean gles3Available = hasGLES3Impl && ( esCtxUndef || GLContext.isGLES3Available(device, es3HardwareRasterizer) );
+ final boolean gles3HWAvailable = gles3Available && es3HardwareRasterizer[0] ;
+ if(hasGL234Impl) {
+ if(GLContext.isGL4Available(device, isHardwareRasterizer)) {
+ if(!gles3HWAvailable || isHardwareRasterizer[0]) {
+ return GL4;
+ }
}
- }
- if(GLContext.isGL4bcAvailable(device, isHardwareRasterizer)) {
- if(!gles3HWAvailable || isHardwareRasterizer[0]) {
- return GL4bc;
+ if( GLContext.isGL4bcAvailable(device, isHardwareRasterizer)) {
+ if(!gles3HWAvailable || isHardwareRasterizer[0]) {
+ return GL4bc;
+ }
+ }
+ if(GLContext.isGL3Available(device, isHardwareRasterizer)) {
+ if(!gles3HWAvailable || isHardwareRasterizer[0]) {
+ return GL3;
+ }
+ }
+ if( desktopCtxUndef || GLContext.isGL3bcAvailable(device, isHardwareRasterizer)) {
+ if(!gles3HWAvailable || isHardwareRasterizer[0]) {
+ return GL3bc;
+ }
}
}
- }
- if(gles3Available) {
- isHardwareRasterizer[0] = es3HardwareRasterizer[0];
- return GLES3;
+ if(gles3Available) {
+ isHardwareRasterizer[0] = es3HardwareRasterizer[0];
+ return GLES3;
+ }
}
} else if(GL2GL3.equals(profile)) {
if(hasGL234Impl) {