aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index ed045939b..30665ce01 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -208,7 +208,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
public int[] glCapabilities2AttribList(GLCapabilities caps) {
int[] attrs = new int[] {
- EGL.EGL_RENDERABLE_TYPE, EGL.EGL_OPENGL_ES_BIT,
+ EGL.EGL_RENDERABLE_TYPE, -1,
// FIXME: does this need to be configurable?
EGL.EGL_SURFACE_TYPE, EGL.EGL_WINDOW_BIT,
EGL.EGL_RED_SIZE, caps.getRedBits(),
@@ -220,8 +220,11 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
EGL.EGL_NONE
};
if (GLProfile.isGLES2()) {
- // ES 2
attrs[1] = EGL.EGL_OPENGL_ES2_BIT;
+ } else if (GLProfile.isGLES1()) {
+ attrs[1] = EGL.EGL_OPENGL_ES_BIT;
+ } else {
+ throw new GLException("Error creating EGL drawable - invalid GLProfile");
}
return attrs;