summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java15
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java5
4 files changed, 13 insertions, 18 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index dbdfcd5d9..cdddb1bd9 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -37,6 +37,7 @@ package jogamp.opengl.egl;
import javax.media.opengl.*;
import jogamp.opengl.*;
+
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
import java.nio.*;
@@ -170,8 +171,8 @@ public abstract class EGLContext extends GLContextImpl {
}
contextHandle = EGL.eglCreateContext(eglDisplay, eglConfig, shareWith, contextAttrs, 0);
if (contextHandle == 0) {
- throw new GLException("Error creating OpenGL context: eglDisplay 0x"+Long.toHexString(eglDisplay)+
- ", "+glProfile+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+ throw new GLException("Error creating OpenGL context: eglDisplay "+toHexString(eglDisplay)+
+ ", eglConfig "+toHexString(eglConfig)+", "+glProfile+", error "+toHexString(EGL.eglGetError()));
}
GLContextShareSet.contextCreated(this);
if (DEBUG) {
@@ -189,7 +190,15 @@ public abstract class EGLContext extends GLContextImpl {
throw new GLException("Error making context 0x" +
Long.toHexString(contextHandle) + " current: error code " + EGL.eglGetError());
}
- setGLFunctionAvailability(true, glProfile.usesNativeGLES2()?2:1, 0, CTX_PROFILE_ES|CTX_OPTION_ANY);
+ int ctp = CTX_PROFILE_ES|CTX_OPTION_ANY;
+ int major;
+ if(glProfile.usesNativeGLES2()) {
+ ctp |= CTX_PROFILE_ES2_COMPAT;
+ major = 2;
+ } else {
+ major = 1;
+ }
+ setGLFunctionAvailability(true, major, 0, ctp);
return true;
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index b6599de1b..45d286da3 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -49,7 +49,6 @@ import java.util.HashMap;
import java.util.List;
public class EGLDrawableFactory extends GLDrawableFactoryImpl {
-
private static final GLDynamicLookupHelper eglES1DynamicLookupHelper;
private static final GLDynamicLookupHelper eglES2DynamicLookupHelper;
@@ -121,10 +120,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
- if(device instanceof EGLGraphicsDevice) {
- return true;
- }
- return false;
+ return true; // via mappings (X11/WGL/.. -> EGL) we shall be able to handle all types.
}
private SharedResource getOrCreateShared(AbstractGraphicsDevice device) {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
index a62c847ca..221a64ced 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
@@ -55,11 +55,6 @@ public class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo
glesLibNames.add("libGLES_CM");
glesLibNames.add("libGLES_CL");
glesLibNames.add("libGLESv1_CM");
- // last but not least, we may even use the desktop GL library,
- // which would be eg Mesa + Gallium EGL ..
- glesLibNames.add("libGL.so.1");
- glesLibNames.add("libGL.so");
- glesLibNames.add("GL");
libNames.add(glesLibNames);
libNames.add(getEGLLibNamesList());
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
index 0477fc2c7..5a9815fdd 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
@@ -55,11 +55,6 @@ public class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo
glesLibNames.add("libGLES20");
glesLibNames.add("libGLESv2");
glesLibNames.add("libGLESv2_CM");
- // last but not least, we may even use the desktop GL library,
- // which would be eg Mesa + Gallium EGL ..
- glesLibNames.add("libGL.so.1");
- glesLibNames.add("libGL.so");
- glesLibNames.add("GL");
libNames.add(glesLibNames);
libNames.add(getEGLLibNamesList());