summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLProfile.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-29 20:52:10 +0200
committerSven Gothel <[email protected]>2014-07-29 20:52:10 +0200
commit323fd68b6cce41de4980a909ef55273a98a8aad9 (patch)
tree0fd753ba87f1a9f1ad2978639d1321d925390945 /src/jogl/classes/javax/media/opengl/GLProfile.java
parent67444b99f42e5a6db282e8a7dbc0e633713d0d48 (diff)
BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow FixedFunctionHook to properly determine it's identity
BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow using a prologue hook as needed for FixedFunctionHook's 'isGL*core()', 'isGLES*Compatible()' and 'getGLProfile()' methods. The latter FixedFunctionHook take the emulated GL profile GL2ES1 into account, allowing JOGL code to assume only having GL2ES1 available. Otherwise methods like Texture.enable(..) would skip the glEnable(TEXTURE_2D) call and FixedFunctionHook could not enable it's usage. GLProfile received a 'public static GLProfile createCustomGLProfile(final String profile, final GLProfile profileImpl)' allowing utilities like FixedFunctionHook to create a generic profile. BuildComposablePipeline sorts the methods before emitting for better readability.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 324fdee92..5c70ec675 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1529,7 +1529,7 @@ public class GLProfile {
@Override
public String toString() {
- return "GLProfile[" + getName() + "/" + getImplName() + "."+(this.isHardwareRasterizer?"hw":"sw")+"]";
+ return "GLProfile[" + getName() + "/" + getImplName() + "."+(this.isHardwareRasterizer?"hw":"sw")+(isCustom?".custom":"")+"]";
}
private static /*final*/ boolean isAWTAvailable;
@@ -1952,13 +1952,13 @@ public class GLProfile {
if( null != profileImpl ) {
final GLProfile glProfile;
if( profile.equals( profileImpl ) ) {
- glProfile = new GLProfile(profile, null, isHardwareRasterizer[0]);
+ glProfile = new GLProfile(profile, null, isHardwareRasterizer[0], false /* custom */);
} else {
final GLProfile _mglp = _mappedProfiles.get( profileImpl );
if( null == _mglp ) {
throw new InternalError("XXX0 profile["+i+"]: "+profile+" -> profileImpl "+profileImpl+" !!! not mapped ");
}
- glProfile = new GLProfile(profile, _mglp, isHardwareRasterizer[0]);
+ glProfile = new GLProfile(profile, _mglp, isHardwareRasterizer[0], false /* custom */);
}
_mappedProfiles.put(profile, glProfile);
if (DEBUG) {
@@ -2180,13 +2180,19 @@ public class GLProfile {
}
}
- private GLProfile(final String profile, final GLProfile profileImpl, final boolean isHardwareRasterizer) {
+ private GLProfile(final String profile, final GLProfile profileImpl, final boolean isHardwareRasterizer, final boolean isCustom) {
this.profile = profile;
this.profileImpl = profileImpl;
this.isHardwareRasterizer = isHardwareRasterizer;
+ this.isCustom = isCustom;
+ }
+
+ public static GLProfile createCustomGLProfile(final String profile, final GLProfile profileImpl) {
+ return new GLProfile(profile, profileImpl, profileImpl.isHardwareRasterizer, true);
}
private final GLProfile profileImpl;
private final String profile;
private final boolean isHardwareRasterizer;
+ private final boolean isCustom;
}