summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-22 20:39:36 +0200
committerSven Gothel <[email protected]>2010-04-22 20:39:36 +0200
commit848df0f3b4d2cd27e03fc25c424759b870c6514b (patch)
tree1e583ed6a7d570f4aa7271c7583bb0d456a9c445 /src/jogl/classes/com/jogamp/opengl/impl
parent94c4ef007321f24177b32174d1ab24c91271da1f (diff)
Bring back GL2ES12 impl. for GL2ES1 and GL2ES2 desktop j2se and cdc. Fixing profiles accordingly.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java5
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java9
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java2
4 files changed, 12 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
index 1ed0396a9..9d1235e13 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
@@ -113,9 +113,7 @@ public final class ExtensionAvailabilityCache {
boolean useGetStringi = false;
- if ( context.getGLVersionMajor() > 3 ||
- ( context.getGLVersionMajor() == 3 && context.getGLVersionMinor() >= 0 ) ||
- gl.isGL3() ) {
+ if ( gl.isGL2GL3() ) {
if ( ! gl.isFunctionAvailable("glGetStringi") ) {
if(DEBUG) {
System.err.println("GLContext: GL >= 3.1 usage, but no glGetStringi");
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
index 3abb69a7f..7143344bf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
@@ -602,10 +602,7 @@ public abstract class GLContextImpl extends GLContext {
//
private Object createInstance(GLProfile glp, String suffix, Class[] cstrArgTypes, Object[] cstrArgs) {
- try {
- return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs);
- } catch (JogampRuntimeException jre) { /* n/a .. */ }
- return null;
+ return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs);
}
/** Create the GL for this context. */
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java b/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
index 7747b014b..c3958eedf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
@@ -67,6 +67,15 @@ public class GLJNILibLoader extends JNILibLoaderBase {
});
}
+ public static void loadGLDesktopES12() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2es12", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
public static void loadES2() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
index 7d907bf28..dce25978c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
@@ -308,7 +308,7 @@ public abstract class X11GLXContext extends GLContextImpl {
}
}
} else {
- if(!glp.isGL2()) {
+ if(glp.isGL3()) {
glXMakeContextCurrent(display, 0, 0, 0);
GLX.glXDestroyContext(display, temp_context);
throw new GLException("X11GLXContext.createContext failed, but context > GL2 requested "+getGLVersion(null, major[0], minor[0], ctp[0], "@creation")+", ");