/** Indicates whether this profile is capable of GL3. <p>Includes [ GL4bc, GL4, GL3bc, GL3 ].</p> */ public final boolean isGL3() { return isGL4() || isGL3bc() || GL3 == profile; }
public GLProfile getProfile() { // tries to get the most capable profile, programmable or fixed, desktop or embedded, forward or backward // compatible GLProfile profile = GLProfile.getMaximum(true); final boolean isForwardCompatible = (!profile.isGL4() && profile.isGL3() && !profile.isGL3bc()) || (profile.isGL4() && !profile.isGL4bc()); if (isForwardCompatible) { // Ardor3D doesn't support forward compatible yet profile = GLProfile.getMaxFixedFunc(true); } return profile; }
/** Indicates whether this profile is capable of GL4ES3. <p>Includes [ GL4bc, GL4, GLES3 ].</p> */ public final boolean isGL4ES3() { return GL4ES3 == profile || isGLES3() || isGL4(); }
/** * Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request. */ protected static final void getRequestMajorAndCompat(final GLProfile glp, final int[/*2*/] reqMajorCTP) { final GLProfile glpImpl = glp.getImpl(); if( glpImpl.isGL4() ) { reqMajorCTP[0]=4; } else if ( glpImpl.isGL3() || glpImpl.isGLES3() ) { reqMajorCTP[0]=3; } else if (glpImpl.isGLES1()) { reqMajorCTP[0]=1; } else /* if (glpImpl.isGL2() || glpImpl.isGLES2()) */ { reqMajorCTP[0]=2; } if( glpImpl.isGLES() ) { reqMajorCTP[1]=CTX_PROFILE_ES; } else if( glpImpl.isGL2() ) { // incl GL3bc and GL4bc reqMajorCTP[1]=CTX_PROFILE_COMPAT; } else { reqMajorCTP[1]=CTX_PROFILE_CORE; } }
@Override protected boolean createImpl(final long shareWithHandle) throws GLException { final MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration(); final GLCapabilitiesImmutable capabilitiesChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities(); final GLProfile glp = capabilitiesChosen.getGLProfile(); if( glp.isGLES() || ( glp.isGL3() && !isLionOrLater ) || ( glp.isGL4() && !isMavericksOrLater ) ) { throw new GLException("OpenGL profile not supported on MacOSX "+Platform.getOSVersionNumber()+": "+glp); } if( 0 != shareWithHandle && GLBackendType.NSOPENGL != getOpenGLMode() ) { throw new GLException("Context sharing only supported in mode "+GLBackendType.NSOPENGL+": "+this); } contextHandle = createContextARB(shareWithHandle, true); return 0 != contextHandle; }