/** * Returns the availability of a profile on the default device. * * @param profile a valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..), * or <code>[ null, GL ]</code> for the default profile. * @return true if the profile is available for the default device, otherwise false. */ public static boolean isAvailable(final String profile) { return isAvailable(null, profile); }
/** * Returns the availability of any profile on the default device. * * @return true if any profile is available for the default device, otherwise false. */ public static boolean isAnyAvailable() { return isAvailable(null, null); }
public static GLProfile getCompatible(final EGLGraphicsDevice device, final int renderableType) { if(0 != (renderableType & EGLExt.EGL_OPENGL_ES3_BIT_KHR) && GLProfile.isAvailable(device, GLProfile.GLES3)) { return GLProfile.get(device, GLProfile.GLES3); } if(0 != (renderableType & EGL.EGL_OPENGL_ES2_BIT) && GLProfile.isAvailable(device, GLProfile.GLES2)) { return GLProfile.get(device, GLProfile.GLES2); } if(0 != (renderableType & EGL.EGL_OPENGL_ES_BIT) && GLProfile.isAvailable(device, GLProfile.GLES1)) { return GLProfile.get(device, GLProfile.GLES1); } if(0 != (renderableType & EGL.EGL_OPENGL_BIT)) { return GLProfile.getDefault(device); } return null; }
protected static WindowsBitmapWGLDrawable create(final GLDrawableFactory factory, final NativeSurface comp) { final WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)comp.getGraphicsConfiguration(); final AbstractGraphicsDevice aDevice = config.getScreen().getDevice(); if( !GLProfile.isAvailable(aDevice, GLProfile.GL2) ) { throw new GLException("GLProfile GL2 n/a on "+aDevice+" but required for Windows BITMAP"); } final GLProfile glp = GLProfile.get(GLProfile.GL2); final GLCapabilitiesImmutable capsChosen0 = (GLCapabilitiesImmutable)config.getChosenCapabilities(); // RGB555 and also alpha channel is experienced to fail on some Windows machines final GLCapabilitiesImmutable capsChosen1 = GLGraphicsConfigurationUtil.clipRGBAGLCapabilities(capsChosen0, false /* allowRGB555 */, false /* allowAlpha */); final GLCapabilitiesImmutable capsChosen2 = GLGraphicsConfigurationUtil.fixGLProfile(capsChosen1, glp); if( capsChosen0 != capsChosen2 ) { config.setChosenCapabilities(capsChosen2); if(DEBUG) { System.err.println("WindowsBitmapWGLDrawable: "+capsChosen0+" -> "+capsChosen2); } } return new WindowsBitmapWGLDrawable(factory, comp); }
throw new GLException("Invalid ES profile number "+esProfile[0]); if ( !GLProfile.isAvailable(adevice, profileString) ) { if( DEBUG ) { System.err.println("EGLDrawableFactory.mapAvailableEGLESConfig: "+profileString+" n/a on "+adevice);