From 83ed8356341b51d7088b8f93df17ee6db6021f42 Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Sat, 6 Apr 2013 14:39:05 +0200 Subject: Fixes a bug in the dedicated method to get the GLProfile, skips forward compatible profiles --- .../src/main/java/com/ardor3d/framework/jogl/CapsUtil.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3