/** * Calls {@link #getGL2ES2(AbstractGraphicsDevice)} using the default device. * <p>Selection favors hardware rasterizer.</p> * @see #getGL2ES2(AbstractGraphicsDevice) */ public static GLProfile getGL2ES2() throws GLException { return get(defaultDevice, GL2ES2).getImpl(); }
/** * Calls {@link #getGL4ES3(AbstractGraphicsDevice)} using the default device. * <p>Selection favors hardware rasterizer.</p> * @see #getGL4ES3(AbstractGraphicsDevice) */ public static GLProfile getGL4ES3() throws GLException { return get(defaultDevice, GL4ES3).getImpl(); }
/** * Calls {@link #getGL2GL3(AbstractGraphicsDevice)} using the default device. * <p>Selection favors hardware rasterizer.</p> * @see #getGL2GL3(AbstractGraphicsDevice) */ public static GLProfile getGL2GL3() throws GLException { return get(defaultDevice, GL2GL3).getImpl(); }
/** * Calls {@link #getGL2ES1(AbstractGraphicsDevice)} using the default device. * <p>Selection favors hardware rasterizer.</p> * @see #getGL2ES1(AbstractGraphicsDevice) */ public static GLProfile getGL2ES1() throws GLException { return get(defaultDevice, GL2ES1).getImpl(); }
/** * Returns the GL4ES3 profile implementation, hence compatible w/ GL4ES3.<br/> * It returns: * <pre> * GLProfile.get(device, GLProfile.GL4ES3).getImpl()); * </pre> * <p>Selection favors hardware rasterizer.</p> * * @throws GLException if no GL4ES3 compatible profile is available for the default device. * @see #isGL4ES3() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ public static GLProfile getGL4ES3(final AbstractGraphicsDevice device) throws GLException { return get(device, GL4ES3).getImpl(); }
/** * Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.<br/> * It returns: * <pre> * GLProfile.get(device, GLProfile.GL2ES2).getImpl()); * </pre> * <p>Selection favors hardware rasterizer.</p> * * @throws GLException if no GL2ES2 compatible profile is available for the default device. * @see #isGL2ES2() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ public static GLProfile getGL2ES2(final AbstractGraphicsDevice device) throws GLException { return get(device, GL2ES2).getImpl(); }
/** * Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.<br/> * It returns: * <pre> * GLProfile.get(device, GLProfile.GL2GL3).getImpl()); * </pre> * <p>Selection favors hardware rasterizer.</p> * * @throws GLException if no GL2GL3 compatible profile is available for the default device. * @see #isGL2GL3() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ public static GLProfile getGL2GL3(final AbstractGraphicsDevice device) throws GLException { return get(device, GL2GL3).getImpl(); }
/** * Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.<br/> * It returns: * <pre> * GLProfile.get(device, GLProfile.GL2ES1).getImpl()); * </pre> * <p>Selection favors hardware rasterizer.</p> * * @throws GLException if no GL2ES1 compatible profile is available for the default device. * @see #isGL2ES1() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ public static GLProfile getGL2ES1(final AbstractGraphicsDevice device) throws GLException { return get(device, GL2ES1).getImpl(); }
/** * @param gl * @param mode TODO * @param pmvMatrix optional pass through PMVMatrix for the {@link FixedFuncHook} and {@link FixedFuncPipeline} */ public FixedFuncHook (final GL2ES2 gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix) { this.gl2es1GLProfile = GLProfile.createCustomGLProfile(GLProfile.GL2ES1, gl.getGLProfile().getImpl()); this.gl = gl; if(null != pmvMatrix) { this.ownsPMVMatrix = false; this.pmvMatrix = pmvMatrix; } else { this.ownsPMVMatrix = true; this.pmvMatrix = new PMVMatrix(); } fixedFunction = new FixedFuncPipeline(this.gl, mode, this.pmvMatrix); }
/** * @param gl * @param mode TODO * @param pmvMatrix optional pass through PMVMatrix for the {@link FixedFuncHook} and {@link FixedFuncPipeline} */ public FixedFuncHook(final GL2ES2 gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix, final Class<?> shaderRootClass, final String shaderSrcRoot, final String shaderBinRoot, final String vertexColorFile, final String vertexColorLightFile, final String fragmentColorFile, final String fragmentColorTextureFile) { this.gl2es1GLProfile = GLProfile.createCustomGLProfile(GLProfile.GL2ES1, gl.getGLProfile().getImpl()); this.gl = gl; if(null != pmvMatrix) { this.ownsPMVMatrix = false; this.pmvMatrix = pmvMatrix; } else { this.ownsPMVMatrix = true; this.pmvMatrix = new PMVMatrix(); } fixedFunction = new FixedFuncPipeline(this.gl, mode, this.pmvMatrix, shaderRootClass, shaderSrcRoot, shaderBinRoot, vertexColorFile, vertexColorLightFile, fragmentColorFile, fragmentColorTextureFile); }
/** * 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; } }