aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl/src/main
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-04-06 14:39:05 +0200
committerJulien Gouesse <[email protected]>2013-04-06 14:39:05 +0200
commit83ed8356341b51d7088b8f93df17ee6db6021f42 (patch)
tree884a90921808e68d248657282f80aac8299901a7 /ardor3d-jogl/src/main
parent4a0370758d4023ca095054c3c8d8583b89dfb465 (diff)
Fixes a bug in the dedicated method to get the GLProfile, skips forward compatible profiles
Diffstat (limited to 'ardor3d-jogl/src/main')
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java11
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) {