From 0ef5c280a3f3b6c2cf1276a69df537d982d6c1cd Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Mon, 31 Jan 2011 15:12:33 +0100
Subject: JOGL change of default GLProfile order: GL4bc, GL3bc, GL2, GL2GL3,
 GL4, GL3, GL2ES2, GLES2, GL2ES1, GLES1

---
 src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java   | 12 +++---------
 .../opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java   |  2 +-
 .../jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java    |  3 +--
 3 files changed, 5 insertions(+), 12 deletions(-)

(limited to 'src/jogl/classes/com/jogamp/opengl/impl')

diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
index 7c9080e5d..c597e5d88 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
@@ -558,15 +558,9 @@ public abstract class GLContextImpl extends GLContext {
         ctp |=  CTX_PROFILE_COMPAT ;
     }
 
-    // FIXME GL3GL4:
-    // To avoid OpenGL implementation bugs and raise compatibility
-    // within JOGL, we map to the proper GL version.
-    // This may change later when GL3 and GL4 drivers become more mature!
-    // Bug: To ensure GL profile compatibility within the JOGL application
-    // Bug: we always try to map against the highest GL version,
-    // Bug: so the use can always cast to a higher one
-    // Bug: int majorMax=GLContext.getMaxMajor(); 
-    // Bug: int minorMax=GLContext.getMaxMinor(majorMax);
+    // To ensure GL profile compatibility within the JOGL application
+    // we always try to map against the highest GL version,
+    // so the user can always cast to the highest available one.
     int majorMax, minorMax;
     int majorMin, minorMin;
     int major[] = new int[1];
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 587c465c1..674690e50 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -218,7 +218,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                 if (null == absScreen) {
                     throw new GLException("Couldn't create shared screen for device: "+sharedDevice+", idx 0");
                 }
-                GLProfile glp = GLProfile.getDefault(sharedDevice);
+                GLProfile glp = GLProfile.getMinDesktop(sharedDevice);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index 54be2d471..709e2ddab 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -180,8 +180,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
                 if (null == sharedScreen) {
                     throw new GLException("Couldn't create shared screen for device: "+sharedDevice+", idx 0");
                 }
-                // GLProfile glp = GLProfile.getMinDesktop(sharedDevice);
-                GLProfile glp = GLProfile.getDefault(sharedDevice);
+                GLProfile glp = GLProfile.getMinDesktop(sharedDevice);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
-- 
cgit v1.2.3