aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/egl/EGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-11-23 16:59:58 +0000
committerSven Gothel <[email protected]>2008-11-23 16:59:58 +0000
commitf1cba2308b3f389bfd72fdc2b5a678497b474222 (patch)
treeaf973c181ca7ce65b7e0c28100b1eeea99f6266b /src/classes/com/sun/opengl/impl/egl/EGLContext.java
parentb69eeed9be76fd74da610da089b730a7cee592c9 (diff)
proper EGL version attr setting
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1801 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/egl/EGLContext.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLContext.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
index b211a8fe2..2be9537b2 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
@@ -198,14 +198,16 @@ public class EGLContext extends GLContextImpl {
}
}
- int[] contextAttrs = null;
- // FIXME: need to determine whether to specify the context
- // attributes based on the EGL version
- if (GLProfile.isGLES2()) {
- contextAttrs = new int[] {
- EGL.EGL_CONTEXT_CLIENT_VERSION, 2,
+ int[] contextAttrs = new int[] {
+ EGL.EGL_CONTEXT_CLIENT_VERSION, -1,
EGL.EGL_NONE
- };
+ };
+ if (GLProfile.isGLES2()) {
+ contextAttrs[1] = 2;
+ } else if (GLProfile.isGLES1()) {
+ contextAttrs[1] = 1;
+ } else {
+ throw new GLException("Error creating OpenGL context - invalid GLProfile");
}
context = EGL.eglCreateContext(display, config, shareWith, contextAttrs, 0);
if (context == 0) {