diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java | 14 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java | 17 |
2 files changed, 11 insertions, 20 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java index 5b080a183..4f141fbb1 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java @@ -42,7 +42,6 @@ import javax.media.opengl.GLException; import jogamp.nativewindow.ProxySurfaceImpl; import jogamp.opengl.GLDrawableImpl; -import jogamp.opengl.GLDynamicLookupHelper; import com.jogamp.nativewindow.egl.EGLGraphicsDevice; import com.jogamp.opengl.egl.EGL; @@ -117,19 +116,6 @@ public class EGLDrawable extends GLDrawableImpl { } @Override - public GLDynamicLookupHelper getGLDynamicLookupHelper() { - if (getGLProfile().usesNativeGLES3()) { - return getFactoryImpl().getGLDynamicLookupHelper(3); - } else if (getGLProfile().usesNativeGLES2()) { - return getFactoryImpl().getGLDynamicLookupHelper(2); - } else if (getGLProfile().usesNativeGLES1()) { - return getFactoryImpl().getGLDynamicLookupHelper(1); - } else { - throw new GLException("Unsupported: "+getGLProfile()); - } - } - - @Override public String toString() { return getClass().getName()+"[realized "+isRealized()+ ",\n\tfactory "+getFactory()+ diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index 967bcb6da..55f6248c8 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -885,14 +885,19 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } @Override - public GLDynamicLookupHelper getGLDynamicLookupHelper(final int esProfile) { - if ( 2==esProfile || 3==esProfile ) { - return eglES2DynamicLookupHelper; - } else if (1==esProfile) { - return eglES1DynamicLookupHelper; + public GLDynamicLookupHelper getGLDynamicLookupHelper(final String esProfile) { + final GLDynamicLookupHelper res; + if ( GLProfile.GLES2 == esProfile || GLProfile.GLES3 == esProfile ) { + res = eglES2DynamicLookupHelper; + } else if ( GLProfile.GLES1 == esProfile ) { + res = eglES1DynamicLookupHelper; } else { - return eglGLnDynamicLookupHelper; + res = eglGLnDynamicLookupHelper; } + if( null == res ) { + throw new GLException("No lookup for esProfile "+esProfile); + } + return res; } @Override |