From 43ca6eea35ed06b462f609bd5704d9499c678927 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 31 Jul 2011 19:33:04 +0200 Subject: GLDrawableFactory::getFactoryImpl(): Only return the EGL factory if profile is native ES --- src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index 73b2b3823..5fc977581 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -312,16 +312,15 @@ public abstract class GLDrawableFactory { protected static GLDrawableFactory getFactoryImpl(String glProfileImplName) throws GLException { if ( GLProfile.usesNativeGLES(glProfileImplName) ) { - if(null==eglFactory) throw new GLException("EGLDrawableFactory unavailable: "+glProfileImplName); + if(null==eglFactory) { + throw new GLException("No EGLDrawableFactory available for profile: "+glProfileImplName); + } return eglFactory; } - if(null!=nativeOSFactory) { - return nativeOSFactory; + if(null==nativeOSFactory) { + throw new GLException("No native platform GLDrawableFactory available for profile: "+glProfileImplName); } - if(null!=eglFactory) { - return eglFactory; - } - throw new GLException("No native platform GLDrawableFactory, nor EGLDrawableFactory available: "+glProfileImplName); + return nativeOSFactory; } protected static GLDrawableFactory getFactoryImpl(AbstractGraphicsDevice device) throws GLException { -- cgit v1.2.3