Class GLProfile
- java.lang.Object
-
- com.jogamp.opengl.GLProfile
-
public class GLProfile extends Object
Specifies the the OpenGL profile. This class static singleton initialization queries the availability of all OpenGL Profiles and instantiates singleton GLProfile objects for each available profile. The platform default profile may be used, usingGLProfile#GetProfileDefault()
, or more specialized versions using the other static GetProfile methods.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
static boolean
disabledEGL
In case no EGL implementation is available like on thePlatform.OSType.IOS
platform, this is set totrue
.static boolean
disableOpenGLARBContext
In case the implementation of the ARB_create_context context creation extension is buggy on one platform, setting the propertyjogl.disable.openglarbcontext
disables utilizing it.static boolean
disableOpenGLCore
In case no native OpenGL core profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.openglcore
disables querying possible existing native OpenGL core profiles.static boolean
disableOpenGLDesktop
In case no OpenGL desktop profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.opengldesktop
disables querying possible existing OpenGL desktop profiles.static boolean
disableOpenGLES
In case no OpenGL ES profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.opengles
disables querying possible existing OpenGL ES profiles.static boolean
disableSurfacelessContext
Disable surfaceless OpenGL context capability and its probing by setting the propertyjogl.disable.surfacelesscontext
.static boolean
enableANGLE
We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome.static String[]
GL_PROFILE_LIST_ALL
All GL Profiles in the order of default detection.static String[]
GL_PROFILE_LIST_MAX
Order of maximum profiles.static String[]
GL_PROFILE_LIST_MAX_FIXEDFUNC
Order of maximum fixed function profiles GL4bc GL3bc GL2 GLES1static String[]
GL_PROFILE_LIST_MAX_MOBILE
Order of maximum original mobile profiles.static String[]
GL_PROFILE_LIST_MAX_PROGSHADER
Order of maximum programmable shader profiles GL4bc GL4 GL3bc GL3 GLES3 GL2 GLES2static String[]
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
Order of maximum programmable shader core only profiles GL4 GL3 GLES3 GLES2static String[]
GL_PROFILE_LIST_MIN
Order of minimum profiles.static String[]
GL_PROFILE_LIST_MIN_DESKTOP
Order of minimum original desktop profiles.static String
GL2
The desktop OpenGL profile 1.x up to 3.0static String
GL2ES1
The intersection of the desktop GL2 and embedded ES1 profilestatic String
GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profilestatic String
GL2GL3
The intersection of the desktop GL3 and GL2 profilestatic String
GL3
The desktop OpenGL core profile 3.x, with x >= 1static String
GL3bc
The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.
bc
stands for backward compatibility.static String
GL4
The desktop OpenGL core profile 4.x, with x >= 0static String
GL4bc
The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.
bc
stands for backward compatibility.static String
GL4ES3
The intersection of the desktop GL4 and ES3 profile, available only if either ES3 or GL4 w/GL_ARB_ES3_compatibility
is available.static String
GLES1
The embedded OpenGL profile ES 1.x, with x >= 0static String
GLES2
The embedded OpenGL profile ES 2.x, with x >= 0static String
GLES3
The embedded OpenGL profile ES 3.x, with x >= 0
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GLProfile
createCustomGLProfile(String profile, GLProfile profileImpl)
boolean
equals(Object o)
static GLProfile
get(AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.static GLProfile
get(AbstractGraphicsDevice device, String[] profiles, boolean favorHardwareRasterizer)
Returns the first profile from the given list, where an implementation is available.static GLProfile
get(String profile)
Uses the default devicestatic GLProfile
get(String[] profiles, boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getDefault()
Returns a default GLProfile object, reflecting the best for the running platform.static GLProfile
getDefault(AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.static AbstractGraphicsDevice
getDefaultDevice()
static GLProfile
getGL2ES1()
CallsgetGL2ES1(AbstractGraphicsDevice)
using the default device.static GLProfile
getGL2ES1(AbstractGraphicsDevice device)
Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.
It returns:static GLProfile
getGL2ES2()
CallsgetGL2ES2(AbstractGraphicsDevice)
using the default device.static GLProfile
getGL2ES2(AbstractGraphicsDevice device)
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
It returns:static GLProfile
getGL2GL3()
CallsgetGL2GL3(AbstractGraphicsDevice)
using the default device.static GLProfile
getGL2GL3(AbstractGraphicsDevice device)
Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.
It returns:static GLProfile
getGL4ES3()
CallsgetGL4ES3(AbstractGraphicsDevice)
using the default device.static GLProfile
getGL4ES3(AbstractGraphicsDevice device)
Returns the GL4ES3 profile implementation, hence compatible w/ GL4ES3.
It returns:static String
getGLArrayName(int array)
Constructor<?>
getGLCtor(boolean glObject)
String
getGLImplBaseClassName()
static String
getGLTypeName(int type)
GLProfile
getImpl()
return this profiles implementation, eg.String
getImplName()
return this profiles implementation name, eg.static GLProfile
getMaxFixedFunc(boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getMaxFixedFunc(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
Returns the highest profile, implementing the fixed function pipeline.static GLProfile
getMaximum(boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getMaximum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
Returns the highest profile.static GLProfile
getMaxProgrammable(boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getMaxProgrammable(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
Returns the highest profile, implementing the programmable shader pipeline.static GLProfile
getMaxProgrammableCore(boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getMaxProgrammableCore(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
Returns the highest profile, implementing the programmable shader core pipeline only.static GLProfile
getMinimum(boolean favorHardwareRasterizer)
Uses the default devicestatic GLProfile
getMinimum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
Returns the lowest profile.String
getName()
return this profiles namestatic String
glAvailabilityToString()
Uses the default devicestatic String
glAvailabilityToString(AbstractGraphicsDevice device)
static StringBuilder
glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb)
static StringBuilder
glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, String indent, int indentCount)
boolean
hasGLSL()
Indicates whether this profile supports GLSL, i.e.int
hashCode()
static void
initProfiles(AbstractGraphicsDevice device)
Trigger eager initialization of GLProfiles for the given device, in case it isn't done yet.static void
initSingleton()
Static initialization of JOGL.static boolean
isAnyAvailable()
Returns the availability of any profile on the default device.static boolean
isAvailable(AbstractGraphicsDevice device, String profile)
Returns the availability of a profile on a device.static boolean
isAvailable(String profile)
Returns the availability of a profile on the default device.static boolean
isAWTAvailable()
boolean
isGL2()
Indicates whether this profile is capable of GL2 .boolean
isGL2ES1()
Indicates whether this profile is capable of GL2ES1.boolean
isGL2ES2()
Indicates whether this profile is capable of GL2ES2.boolean
isGL2ES3()
Indicates whether this profile is capable of GL2ES3.boolean
isGL2GL3()
Indicates whether this profile is capable of GL2GL3.boolean
isGL3()
Indicates whether this profile is capable of GL3.boolean
isGL3bc()
Indicates whether this profile is capable of GL3bc.boolean
isGL3ES3()
Indicates whether this profile is capable of GL3ES3.boolean
isGL4()
Indicates whether this profile is capable of GL4.boolean
isGL4bc()
Indicates whether this profile is capable of GL4bc.boolean
isGL4ES3()
Indicates whether this profile is capable of GL4ES3.boolean
isGLES()
Indicates whether this profile is capable of GLES.boolean
isGLES1()
Indicates whether this profile is capable of GLES1.boolean
isGLES2()
Indicates whether this profile is capable of GLES2.boolean
isGLES3()
Indicates whether this profile is capable of GLES3.boolean
isHardwareRasterizer()
return true if impl.static boolean
isInitialized()
boolean
isValidArrayDataType(int index, int comps, int type, boolean isVertexAttribPointer, boolean throwException)
General validation if index, comps and type are valid for the current profile.boolean
isValidDataType(int type, boolean throwException)
General validation if type is a valid GL data type for the current profile.static void
shutdown()
Manual shutdown method, may be called after your last JOGL use within the running JVM.
It releases all temporary created resources, ie issuesGLDrawableFactory.shutdown()
.
The shutdown implementation is called via the JVM shutdown hook, if not manually invoked.String
toString()
boolean
usesNativeGLES()
Indicates whether this profile uses either of the native OpenGL ES implementations.static boolean
usesNativeGLES(String profileImpl)
Indicates whether either of the native OpenGL ES profiles are in use.boolean
usesNativeGLES1()
Indicates whether this profile uses the native OpenGL ES1 implementations.static boolean
usesNativeGLES1(String profileImpl)
Indicates whether the native OpenGL ES1 profile is in use.boolean
usesNativeGLES2()
Indicates whether this profile uses the native OpenGL ES2 implementations.static boolean
usesNativeGLES2(String profileImpl)
Indicates whether the native OpenGL ES3 or ES2 profile is in use.boolean
usesNativeGLES3()
Indicates whether this profile uses the native OpenGL ES3 implementations.static boolean
usesNativeGLES3(String profileImpl)
Indicates whether the native OpenGL ES2 profile is in use.void
verifyEquality(GLProfile glp)
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
-
disableOpenGLCore
public static final boolean disableOpenGLCore
In case no native OpenGL core profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.openglcore
disables querying possible existing native OpenGL core profiles.This exclusion is disabled for
Platform.OSType.MACOS
andPlatform.OSType.IOS
.
-
disableOpenGLARBContext
public static final boolean disableOpenGLARBContext
In case the implementation of the ARB_create_context context creation extension is buggy on one platform, setting the propertyjogl.disable.openglarbcontext
disables utilizing it.This exclusion also disables
OpenGL ES
.This exclusion is disabled for
Platform.OSType.MACOS
andPlatform.OSType.IOS
.
-
disableOpenGLES
public static final boolean disableOpenGLES
In case no OpenGL ES profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.opengles
disables querying possible existing OpenGL ES profiles.
-
disableOpenGLDesktop
public static final boolean disableOpenGLDesktop
In case no OpenGL desktop profiles are required and if one platform may have a buggy implementation, setting the propertyjogl.disable.opengldesktop
disables querying possible existing OpenGL desktop profiles.
-
disabledEGL
public static final boolean disabledEGL
In case no EGL implementation is available like on thePlatform.OSType.IOS
platform, this is set totrue
.
-
disableSurfacelessContext
public static final boolean disableSurfacelessContext
Disable surfaceless OpenGL context capability and its probing by setting the propertyjogl.disable.surfacelesscontext
.By default surfaceless OpenGL context capability is probed, i.e. whether an OpenGL context can be made current without a default framebuffer.
If probing fails or if this property is set, the
quirk
GLRendererQuirks.NoSurfacelessCtx
is being set.
-
enableANGLE
public static final boolean enableANGLE
We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome. When run in the mentioned browsers, the eglInitialize(..) implementation crashes.This can be overridden by explicitly enabling ANGLE on Windows by setting the property
jogl.enable.ANGLE
.
-
GL4bc
public static final String GL4bc
The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.
bc
stands for backward compatibility.- See Also:
- Constant Field Values
-
GL4
public static final String GL4
The desktop OpenGL core profile 4.x, with x >= 0- See Also:
- Constant Field Values
-
GL3bc
public static final String GL3bc
The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.
bc
stands for backward compatibility.- See Also:
- Constant Field Values
-
GL3
public static final String GL3
The desktop OpenGL core profile 3.x, with x >= 1- See Also:
- Constant Field Values
-
GL2
public static final String GL2
The desktop OpenGL profile 1.x up to 3.0- See Also:
- Constant Field Values
-
GLES1
public static final String GLES1
The embedded OpenGL profile ES 1.x, with x >= 0- See Also:
- Constant Field Values
-
GLES2
public static final String GLES2
The embedded OpenGL profile ES 2.x, with x >= 0- See Also:
- Constant Field Values
-
GLES3
public static final String GLES3
The embedded OpenGL profile ES 3.x, with x >= 0- See Also:
- Constant Field Values
-
GL2ES1
public static final String GL2ES1
The intersection of the desktop GL2 and embedded ES1 profile- See Also:
- Constant Field Values
-
GL2ES2
public static final String GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile- See Also:
- Constant Field Values
-
GL2GL3
public static final String GL2GL3
The intersection of the desktop GL3 and GL2 profile- See Also:
- Constant Field Values
-
GL4ES3
public static final String GL4ES3
The intersection of the desktop GL4 and ES3 profile, available only if either ES3 or GL4 w/GL_ARB_ES3_compatibility
is available.- See Also:
- Constant Field Values
-
GL_PROFILE_LIST_ALL
public static final String[] GL_PROFILE_LIST_ALL
All GL Profiles in the order of default detection. Desktop compatibility profiles (the one with fixed function pipeline) comes first from highest to lowest version.This includes the generic subset profiles GL2GL3, GL2ES2 and GL2ES1.
- GL4bc
- GL3bc
- GL2
- GL4
- GL3
- GLES3
- GL4ES3
- GL2GL3
- GLES2
- GL2ES2
- GLES1
- GL2ES1
-
GL_PROFILE_LIST_MAX
public static final String[] GL_PROFILE_LIST_MAX
Order of maximum profiles.- GL4bc
- GL4
- GL3bc
- GL3
- GLES3
- GL2
- GLES2
- GLES1
-
GL_PROFILE_LIST_MIN
public static final String[] GL_PROFILE_LIST_MIN
Order of minimum profiles.- GLES1
- GLES2
- GL2
- GLES3
- GL3
- GL3bc
- GL4
- GL4bc
-
GL_PROFILE_LIST_MIN_DESKTOP
public static final String[] GL_PROFILE_LIST_MIN_DESKTOP
Order of minimum original desktop profiles.- GL2
- GL3bc
- GL4bc
- GL3
- GL4
-
GL_PROFILE_LIST_MAX_MOBILE
public static final String[] GL_PROFILE_LIST_MAX_MOBILE
Order of maximum original mobile profiles.- GLES3
- GLES2
- GLES1
-
GL_PROFILE_LIST_MAX_FIXEDFUNC
public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC
Order of maximum fixed function profiles- GL4bc
- GL3bc
- GL2
- GLES1
-
GL_PROFILE_LIST_MAX_PROGSHADER
public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER
Order of maximum programmable shader profiles- GL4bc
- GL4
- GL3bc
- GL3
- GLES3
- GL2
- GLES2
-
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER_CORE
Order of maximum programmable shader core only profiles- GL4
- GL3
- GLES3
- GLES2
-
-
Method Detail
-
isInitialized
public static boolean isInitialized()
- Returns:
true
if JOGL has been initialized, i.e. manually viainitSingleton()
or implicit, otherwise returnsfalse
.- Since:
- 2.2.1
-
initSingleton
public static void initSingleton()
Static initialization of JOGL.This method shall not need to be called for other reasons than having a defined initialization sequence.
In case this method is not invoked, GLProfile is initialized implicit by the first call to
getDefault()
,get(java.lang.String)
.To initialize JOGL at startup ASAP, this method may be invoked in the main class's static initializer block, in the static main() method or in the Applet init() method.
Since JOGL's initialization is complex and involves multi threading, it is not recommended to be have it invoked on the AWT EDT thread. In case all JOGL usage is performed on the AWT EDT, invoke this method outside the AWT EDT - see above.
-
initProfiles
public static void initProfiles(AbstractGraphicsDevice device) throws GLException
Trigger eager initialization of GLProfiles for the given device, in case it isn't done yet.- Throws:
GLException
- if no profile for the given device is available.
-
shutdown
public static void shutdown()
Manual shutdown method, may be called after your last JOGL use within the running JVM.
It releases all temporary created resources, ie issuesGLDrawableFactory.shutdown()
.
The shutdown implementation is called via the JVM shutdown hook, if not manually invoked.
This method shall not need to be called for other reasons than issuing a proper shutdown of resources at a defined time.
-
isAvailable
public static boolean isAvailable(AbstractGraphicsDevice device, String profile)
Returns the availability of a profile on a device.
-
isAvailable
public static boolean isAvailable(String profile)
Returns the availability of a profile on the default device.
-
isAnyAvailable
public static boolean isAnyAvailable()
Returns the availability of any profile on the default device.- Returns:
- true if any profile is available for the default device, otherwise false.
-
glAvailabilityToString
public static String glAvailabilityToString(AbstractGraphicsDevice device)
-
glAvailabilityToString
public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb)
-
glAvailabilityToString
public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, String indent, int indentCount)
-
glAvailabilityToString
public static String glAvailabilityToString()
Uses the default device
-
getDefault
public static GLProfile getDefault(AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform. It selects the first of the setGL_PROFILE_LIST_ALL
and favors hardware acceleration.- Throws:
GLException
- if no profile is available for the device.- See Also:
GL_PROFILE_LIST_ALL
-
getDefault
public static GLProfile getDefault()
Returns a default GLProfile object, reflecting the best for the running platform. It selects the first of the setGL_PROFILE_LIST_ALL
and favors hardware acceleration.Uses the default device.
- Throws:
GLException
- if no profile is available for the default device.
-
getMaximum
public static GLProfile getMaximum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
Returns the highest profile. It selects the first of the set:GL_PROFILE_LIST_MAX
- Throws:
GLException
- if no profile is available for the device.- See Also:
GL_PROFILE_LIST_MAX
-
getMaximum
public static GLProfile getMaximum(boolean favorHardwareRasterizer) throws GLException
Uses the default device- Throws:
GLException
- if no profile is available for the default device.- See Also:
GL_PROFILE_LIST_MAX
-
getMinimum
public static GLProfile getMinimum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
Returns the lowest profile. It selects the first of the set:GL_PROFILE_LIST_MIN
- Throws:
GLException
- if no desktop profile is available for the device.- See Also:
GL_PROFILE_LIST_MIN
-
getMinimum
public static GLProfile getMinimum(boolean favorHardwareRasterizer) throws GLException
Uses the default device- Throws:
GLException
- if no desktop profile is available for the default device.- See Also:
GL_PROFILE_LIST_MIN
-
getMaxFixedFunc
public static GLProfile getMaxFixedFunc(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
Returns the highest profile, implementing the fixed function pipeline. It selects the first of the set:GL_PROFILE_LIST_MAX_FIXEDFUNC
- Throws:
GLException
- if no fixed function profile is available for the device.- See Also:
GL_PROFILE_LIST_MAX_FIXEDFUNC
-
getMaxFixedFunc
public static GLProfile getMaxFixedFunc(boolean favorHardwareRasterizer) throws GLException
Uses the default device- Throws:
GLException
- if no fixed function profile is available for the default device.- See Also:
GL_PROFILE_LIST_MAX_FIXEDFUNC
-
getMaxProgrammable
public static GLProfile getMaxProgrammable(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
Returns the highest profile, implementing the programmable shader pipeline. It selects the first of the set:GL_PROFILE_LIST_MAX_PROGSHADER
- Throws:
GLException
- if no programmable profile is available for the device.- See Also:
GL_PROFILE_LIST_MAX_PROGSHADER
-
getMaxProgrammable
public static GLProfile getMaxProgrammable(boolean favorHardwareRasterizer) throws GLException
Uses the default device- Throws:
GLException
- if no programmable profile is available for the default device.- See Also:
GL_PROFILE_LIST_MAX_PROGSHADER
-
getMaxProgrammableCore
public static GLProfile getMaxProgrammableCore(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
Returns the highest profile, implementing the programmable shader core pipeline only. It selects the first of the set:GL_PROFILE_LIST_MAX_PROGSHADER_CORE
- Throws:
GLException
- if no programmable core profile is available for the device.- See Also:
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
-
getMaxProgrammableCore
public static GLProfile getMaxProgrammableCore(boolean favorHardwareRasterizer) throws GLException
Uses the default device- Throws:
GLException
- if no programmable core profile is available for the default device.- See Also:
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
-
getGL2ES1
public static GLProfile getGL2ES1(AbstractGraphicsDevice device) throws GLException
Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.
It returns:GLProfile.get(device, GLProfile.GL2ES1).getImpl());
Selection favors hardware rasterizer.
- Throws:
GLException
- if no GL2ES1 compatible profile is available for the default device.- See Also:
isGL2ES1()
,get(AbstractGraphicsDevice, String)
,getImpl()
-
getGL2ES1
public static GLProfile getGL2ES1() throws GLException
CallsgetGL2ES1(AbstractGraphicsDevice)
using the default device.Selection favors hardware rasterizer.
- Throws:
GLException
- See Also:
getGL2ES1(AbstractGraphicsDevice)
-
getGL2ES2
public static GLProfile getGL2ES2(AbstractGraphicsDevice device) throws GLException
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
It returns:GLProfile.get(device, GLProfile.GL2ES2).getImpl());
Selection favors hardware rasterizer.
- Throws:
GLException
- if no GL2ES2 compatible profile is available for the default device.- See Also:
isGL2ES2()
,get(AbstractGraphicsDevice, String)
,getImpl()
-
getGL2ES2
public static GLProfile getGL2ES2() throws GLException
CallsgetGL2ES2(AbstractGraphicsDevice)
using the default device.Selection favors hardware rasterizer.
- Throws:
GLException
- See Also:
getGL2ES2(AbstractGraphicsDevice)
-
getGL4ES3
public static GLProfile getGL4ES3(AbstractGraphicsDevice device) throws GLException
Returns the GL4ES3 profile implementation, hence compatible w/ GL4ES3.
It returns:GLProfile.get(device, GLProfile.GL4ES3).getImpl());
Selection favors hardware rasterizer.
- Throws:
GLException
- if no GL4ES3 compatible profile is available for the default device.- See Also:
isGL4ES3()
,get(AbstractGraphicsDevice, String)
,getImpl()
-
getGL4ES3
public static GLProfile getGL4ES3() throws GLException
CallsgetGL4ES3(AbstractGraphicsDevice)
using the default device.Selection favors hardware rasterizer.
- Throws:
GLException
- See Also:
getGL4ES3(AbstractGraphicsDevice)
-
getGL2GL3
public static GLProfile getGL2GL3(AbstractGraphicsDevice device) throws GLException
Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.
It returns:GLProfile.get(device, GLProfile.GL2GL3).getImpl());
Selection favors hardware rasterizer.
- Throws:
GLException
- if no GL2GL3 compatible profile is available for the default device.- See Also:
isGL2GL3()
,get(AbstractGraphicsDevice, String)
,getImpl()
-
getGL2GL3
public static GLProfile getGL2GL3() throws GLException
CallsgetGL2GL3(AbstractGraphicsDevice)
using the default device.Selection favors hardware rasterizer.
- Throws:
GLException
- See Also:
getGL2GL3(AbstractGraphicsDevice)
-
get
public static GLProfile get(AbstractGraphicsDevice device, String profile) throws GLException
Returns a GLProfile object. verifies the given profile and chooses an appropriate implementation. A generic value ofnull
orGL
will result in the default profile.- Parameters:
device
- a valid AbstractGraphicsDevice, ornull for the default device.
profile
- a valid GLProfile name (GL4bc
,GL4
,GL2
, ..), or[ null, GL ]
for the default profile.- Throws:
GLException
- if the requested profile is not available for the device.
-
get
public static GLProfile get(String profile) throws GLException
Uses the default device- Parameters:
profile
- a valid GLProfile name (GL4bc
,GL4
,GL2
, ..), or[ null, GL ]
for the default profile.- Throws:
GLException
- if the requested profile is not available for the default device.
-
get
public static GLProfile get(AbstractGraphicsDevice device, String[] profiles, boolean favorHardwareRasterizer) throws GLException
Returns the first profile from the given list, where an implementation is available.- Parameters:
device
- a valid AbstractGraphicsDevice, ornull for the default device.
profiles
- array of valid GLProfile name (GL4bc
,GL4
,GL2
, ..)favorHardwareRasterizer
- set to true, if hardware rasterizer shall be favored, otherwise false.- Throws:
GLException
- if the non of the requested profiles is available for the device.
-
get
public static GLProfile get(String[] profiles, boolean favorHardwareRasterizer) throws GLException
Uses the default device- Parameters:
profiles
- array of valid GLProfile name (GL4bc
,GL4
,GL2
, ..)favorHardwareRasterizer
- set to true, if hardware rasterizer shall be favored, otherwise false.- Throws:
GLException
- if the non of the requested profiles is available for the default device.
-
usesNativeGLES1
public static boolean usesNativeGLES1(String profileImpl)
Indicates whether the native OpenGL ES1 profile is in use. This requires an EGL interface.
-
usesNativeGLES2
public static boolean usesNativeGLES2(String profileImpl)
Indicates whether the native OpenGL ES3 or ES2 profile is in use. This requires an EGL, ES3 or ES2 compatible interface.
-
usesNativeGLES3
public static boolean usesNativeGLES3(String profileImpl)
Indicates whether the native OpenGL ES2 profile is in use. This requires an EGL, ES3 compatible interface.
-
usesNativeGLES
public static boolean usesNativeGLES(String profileImpl)
Indicates whether either of the native OpenGL ES profiles are in use.
-
isAWTAvailable
public static boolean isAWTAvailable()
- Returns:
NativeWindowFactory.isAWTAvailable()
and JOGL's AWT part
-
getGLTypeName
public static String getGLTypeName(int type)
-
getGLArrayName
public static String getGLArrayName(int array)
-
getGLImplBaseClassName
public final String getGLImplBaseClassName()
-
getGLCtor
public final Constructor<?> getGLCtor(boolean glObject)
-
equals
public final boolean equals(Object o)
-
verifyEquality
public final void verifyEquality(GLProfile glp) throws GLException
- Parameters:
glp
- GLProfile to compare with- Throws:
GLException
- if given GLProfile and this aren't equal
-
getName
public final String getName()
return this profiles name
-
getImpl
public final GLProfile getImpl()
return this profiles implementation, eg. GL2ES2 -> GL2, or GL3 -> GL3
-
isHardwareRasterizer
public final boolean isHardwareRasterizer()
return true if impl. is a hardware rasterizer, otherwise false.
-
getImplName
public final String getImplName()
return this profiles implementation name, eg. GL2ES2 -> GL2, or GL3 -> GL3
-
isGL4bc
public final boolean isGL4bc()
Indicates whether this profile is capable of GL4bc.Includes [ GL4bc ].
-
isGL4
public final boolean isGL4()
Indicates whether this profile is capable of GL4.Includes [ GL4bc, GL4 ].
-
isGL3bc
public final boolean isGL3bc()
Indicates whether this profile is capable of GL3bc.Includes [ GL4bc, GL3bc ].
-
isGL3
public final boolean isGL3()
Indicates whether this profile is capable of GL3.Includes [ GL4bc, GL4, GL3bc, GL3 ].
-
isGL2
public final boolean isGL2()
Indicates whether this profile is capable of GL2 .Includes [ GL4bc, GL3bc, GL2 ].
-
isGLES1
public final boolean isGLES1()
Indicates whether this profile is capable of GLES1.Includes [ GLES1 ].
-
isGLES2
public final boolean isGLES2()
Indicates whether this profile is capable of GLES2.Includes [ GLES2, GLES3 ].
-
isGLES3
public final boolean isGLES3()
Indicates whether this profile is capable of GLES3.Includes [ GLES3 ].
-
isGLES
public final boolean isGLES()
Indicates whether this profile is capable of GLES.Includes [ GLES1, GLES2, GLES3 ].
-
isGL2ES1
public final boolean isGL2ES1()
Indicates whether this profile is capable of GL2ES1.Includes [ GL4bc, GL3bc, GL2, GLES1, GL2ES1 ].
-
isGL2GL3
public final boolean isGL2GL3()
Indicates whether this profile is capable of GL2GL3.Includes [ GL4bc, GL4, GL3bc, GL3, GL2, GL2GL3 ].
-
isGL2ES2
public final boolean isGL2ES2()
Indicates whether this profile is capable of GL2ES2.Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL2, GL2GL3, GL2ES2, GLES2 ].
-
isGL2ES3
public final boolean isGL2ES3()
Indicates whether this profile is capable of GL2ES3.Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL3ES3, GL2, GL2GL3 ].
- See Also:
isGL3ES3()
,isGL2GL3()
-
isGL3ES3
public final boolean isGL3ES3()
Indicates whether this profile is capable of GL3ES3.Includes [ GL4bc, GL4, GL3bc, GL3, GLES3 ].
-
isGL4ES3
public final boolean isGL4ES3()
Indicates whether this profile is capable of GL4ES3.Includes [ GL4bc, GL4, GLES3 ].
-
hasGLSL
public final boolean hasGLSL()
Indicates whether this profile supports GLSL, i.e.isGL2ES2()
.
-
usesNativeGLES1
public final boolean usesNativeGLES1()
Indicates whether this profile uses the native OpenGL ES1 implementations.
-
usesNativeGLES2
public final boolean usesNativeGLES2()
Indicates whether this profile uses the native OpenGL ES2 implementations.
-
usesNativeGLES3
public final boolean usesNativeGLES3()
Indicates whether this profile uses the native OpenGL ES3 implementations.
-
usesNativeGLES
public final boolean usesNativeGLES()
Indicates whether this profile uses either of the native OpenGL ES implementations.
-
isValidDataType
public boolean isValidDataType(int type, boolean throwException)
General validation if type is a valid GL data type for the current profile.Disclaimer: The validation might not satisfy updated OpenGL specifications.
-
isValidArrayDataType
public boolean isValidArrayDataType(int index, int comps, int type, boolean isVertexAttribPointer, boolean throwException)
General validation if index, comps and type are valid for the current profile.Disclaimer: The validation might not satisfy updated OpenGL specifications.
-
getDefaultDevice
public static AbstractGraphicsDevice getDefaultDevice()
-
-