aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/egl/EGLContext.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-05-29 09:34:56 +0000
committerKenneth Russel <[email protected]>2008-05-29 09:34:56 +0000
commit832372b20ea45100796a03d49eaff8db2826e3b9 (patch)
treedbfac3193c37fbc029ac3238daed3ac73f1a2d88 /src/classes/com/sun/opengl/impl/egl/EGLContext.java
parent75f83018930f6594b29f16459c1e91b54842924b (diff)
Various bug fixes. Incorporated minimal window abstraction to
bootstrap EGL subsystem. Added back in GLU generation for ES 2. This code creates and shows the window for the demos.es1.RedSquare demo, but nothing is rendered yet. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1645 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.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
index f55b611ca..25ac2c726 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
@@ -123,11 +123,16 @@ public class EGLContext extends GLContextImpl {
}
EGLDrawableFactory factory = (EGLDrawableFactory) GLDrawableFactory.getFactory();
- int clientVersion = (EGLDrawableFactory.PROFILE_GLES2.equals(factory.getProfile()) ? 2 : 1);
- int[] contextAttrs = new int[] {
- EGL.EGL_CONTEXT_CLIENT_VERSION, clientVersion,
- EGL.EGL_NONE
- };
+ boolean isGLES2 = EGLDrawableFactory.PROFILE_GLES2.equals(factory.getProfile());
+ int[] contextAttrs = null;
+ // FIXME: need to determine whether to specify the context
+ // attributes based on the EGL version
+ if (isGLES2) {
+ contextAttrs = new int[] {
+ EGL.EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL.EGL_NONE
+ };
+ }
context = EGL.eglCreateContext(display, config, shareWith, contextAttrs, 0);
if (context == 0) {
throw new GLException("Error creating OpenGL context");