diff options
author | Julien Gouesse <[email protected]> | 2013-04-06 14:39:05 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2013-04-06 14:39:05 +0200 |
commit | 83ed8356341b51d7088b8f93df17ee6db6021f42 (patch) | |
tree | 884a90921808e68d248657282f80aac8299901a7 | |
parent | 4a0370758d4023ca095054c3c8d8583b89dfb465 (diff) |
Fixes a bug in the dedicated method to get the GLProfile, skips forward compatible profiles
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java index 2102ac3..b74bea0 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java @@ -19,7 +19,16 @@ import com.ardor3d.util.Ardor3dException; public class CapsUtil { public static GLProfile getProfile() { - return GLProfile.getMaximum(true); + // tries to get the most capable profile, programmable or fixed, desktop or embedded, forward or backward + // compatible + GLProfile profile = GLProfile.getMaximum(true); + final boolean isForwardCompatible = (!profile.isGL4() && profile.isGL3() && !profile.isGL3bc()) + || (profile.isGL4() && !profile.isGL4bc()); + if (isForwardCompatible) { + // Ardor3D doesn't support forward compatible yet + profile = GLProfile.getMaxFixedFunc(true); + } + return profile; } public static GLCapabilities getCapsForSettings(final DisplaySettings settings) { |