public class GLProfile extends Object
GLProfile#GetProfileDefault()
,
or more specialized versions using the other static GetProfile methods.Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
disableOpenGLARBContext
In case the implementation of the ARB_create_context
context creation extension is buggy on one platform,
setting the property
jogl.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 property
jogl.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 property
jogl.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 property
jogl.disable.opengles disables querying possible existing OpenGL ES profiles. |
static boolean |
disableSurfacelessContext
Disable surfaceless OpenGL context capability and its probing
by setting the property
jogl.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
GLES1
|
static String[] |
GL_PROFILE_LIST_MAX_PROGSHADER
Order of maximum programmable shader profiles
GL4bc
GL4
GL3bc
GL3
GLES3
GL2
GLES2
|
static String[] |
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
Order of maximum programmable shader core only profiles
GL4
GL3
GLES3
GLES2
|
static 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.0
|
static String |
GL2ES1
The intersection of the desktop GL2 and embedded ES1 profile
|
static String |
GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile
|
static String |
GL2GL3
The intersection of the desktop GL3 and GL2 profile
|
static String |
GL3
The desktop OpenGL core profile 3.x, with x >= 1
|
static 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 >= 0
|
static 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 >= 0
|
static String |
GLES2
The embedded OpenGL profile ES 2.x, with x >= 0
|
static String |
GLES3
The embedded OpenGL profile ES 3.x, with x >= 0
|
Modifier and Type | Method and 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 device
|
static GLProfile |
get(String[] profiles,
boolean favorHardwareRasterizer)
Uses the default device
|
static 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()
Calls
getGL2ES1(AbstractGraphicsDevice) using the default device. |
static GLProfile |
getGL2ES1(AbstractGraphicsDevice device)
Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.
It returns: |
static GLProfile |
getGL2ES2()
Calls
getGL2ES2(AbstractGraphicsDevice) using the default device. |
static GLProfile |
getGL2ES2(AbstractGraphicsDevice device)
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
It returns: |
static GLProfile |
getGL2GL3()
Calls
getGL2GL3(AbstractGraphicsDevice) using the default device. |
static GLProfile |
getGL2GL3(AbstractGraphicsDevice device)
Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.
It returns: |
static GLProfile |
getGL4ES3()
Calls
getGL4ES3(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(AbstractGraphicsDevice device,
boolean favorHardwareRasterizer)
Returns the highest profile, implementing the fixed function pipeline.
|
static GLProfile |
getMaxFixedFunc(boolean favorHardwareRasterizer)
Uses the default device
|
static GLProfile |
getMaximum(AbstractGraphicsDevice device,
boolean favorHardwareRasterizer)
Returns the highest profile.
|
static GLProfile |
getMaximum(boolean favorHardwareRasterizer)
Uses the default device
|
static GLProfile |
getMaxProgrammable(AbstractGraphicsDevice device,
boolean favorHardwareRasterizer)
Returns the highest profile, implementing the programmable shader pipeline.
|
static GLProfile |
getMaxProgrammable(boolean favorHardwareRasterizer)
Uses the default device
|
static GLProfile |
getMaxProgrammableCore(AbstractGraphicsDevice device,
boolean favorHardwareRasterizer)
Returns the highest profile, implementing the programmable shader core pipeline only.
|
static GLProfile |
getMaxProgrammableCore(boolean favorHardwareRasterizer)
Uses the default device
|
static GLProfile |
getMinimum(AbstractGraphicsDevice device,
boolean favorHardwareRasterizer)
Returns the lowest profile.
|
static GLProfile |
getMinimum(boolean favorHardwareRasterizer)
Uses the default device
|
String |
getName()
return this profiles name
|
static String |
glAvailabilityToString()
Uses the default device
|
static 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) |
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 issues GLDrawableFactory.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) |
public static final boolean DEBUG
public static final boolean disableOpenGLCore
jogl.disable.openglcore
disables querying possible existing native OpenGL core profiles.
This exclusion is disabled for Platform.OSType#MACOS
.
public static final boolean disableOpenGLARBContext
jogl.disable.openglarbcontext
disables utilizing it.
This exclusion also disables OpenGL ES
.
This exclusion is disabled for Platform.OSType#MACOS
.
public static final boolean disableOpenGLES
jogl.disable.opengles
disables querying possible existing OpenGL ES profiles.public static final boolean disableOpenGLDesktop
jogl.disable.opengldesktop
disables querying possible existing OpenGL desktop profiles.public static final boolean disableSurfacelessContext
jogl.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.
public static final boolean enableANGLE
This can be overridden by explicitly enabling ANGLE on Windows by setting the property
jogl.enable.ANGLE
.
public static final String GL4bc
bc
stands for backward compatibility.public static final String GL4
public static final String GL3bc
bc
stands for backward compatibility.public static final String GL3
public static final String GL2
public static final String GLES1
public static final String GLES2
public static final String GLES3
public static final String GL2ES1
public static final String GL2ES2
public static final String GL2GL3
public static final String GL4ES3
GL_ARB_ES3_compatibility
is available.public static final String[] GL_PROFILE_LIST_ALL
This includes the generic subset profiles GL2GL3, GL2ES2 and GL2ES1.
public static final String[] GL_PROFILE_LIST_MAX
public static final String[] GL_PROFILE_LIST_MIN
public static final String[] GL_PROFILE_LIST_MIN_DESKTOP
public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC
public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER
public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER_CORE
public static boolean isInitialized()
true
if JOGL has been initialized, i.e. manually via initSingleton()
or implicit,
otherwise returns false
.public static void initSingleton()
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.
public static void initProfiles(AbstractGraphicsDevice device) throws GLException
GLException
- if no profile for the given device is available.public static void shutdown()
GLDrawableFactory.shutdown()
.This method shall not need to be called for other reasons than issuing a proper shutdown of resources at a defined time.
public static boolean isAvailable(AbstractGraphicsDevice device, String profile)
public static boolean isAvailable(String profile)
public static boolean isAnyAvailable()
public static String glAvailabilityToString(AbstractGraphicsDevice device)
public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb)
public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, String indent, int indentCount)
public static String glAvailabilityToString()
public static GLProfile getDefault(AbstractGraphicsDevice device)
GL_PROFILE_LIST_ALL
and favors hardware acceleration.GLException
- if no profile is available for the device.GL_PROFILE_LIST_ALL
public static GLProfile getDefault()
GL_PROFILE_LIST_ALL
and favors hardware acceleration.
Uses the default device.
GLException
- if no profile is available for the default device.public static GLProfile getMaximum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
GL_PROFILE_LIST_MAX
GLException
- if no profile is available for the device.GL_PROFILE_LIST_MAX
public static GLProfile getMaximum(boolean favorHardwareRasterizer) throws GLException
GLException
- if no profile is available for the default device.GL_PROFILE_LIST_MAX
public static GLProfile getMinimum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
GL_PROFILE_LIST_MIN
GLException
- if no desktop profile is available for the device.GL_PROFILE_LIST_MIN
public static GLProfile getMinimum(boolean favorHardwareRasterizer) throws GLException
GLException
- if no desktop profile is available for the default device.GL_PROFILE_LIST_MIN
public static GLProfile getMaxFixedFunc(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
GL_PROFILE_LIST_MAX_FIXEDFUNC
GLException
- if no fixed function profile is available for the device.GL_PROFILE_LIST_MAX_FIXEDFUNC
public static GLProfile getMaxFixedFunc(boolean favorHardwareRasterizer) throws GLException
GLException
- if no fixed function profile is available for the default device.GL_PROFILE_LIST_MAX_FIXEDFUNC
public static GLProfile getMaxProgrammable(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
GL_PROFILE_LIST_MAX_PROGSHADER
GLException
- if no programmable profile is available for the device.GL_PROFILE_LIST_MAX_PROGSHADER
public static GLProfile getMaxProgrammable(boolean favorHardwareRasterizer) throws GLException
GLException
- if no programmable profile is available for the default device.GL_PROFILE_LIST_MAX_PROGSHADER
public static GLProfile getMaxProgrammableCore(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) throws GLException
GL_PROFILE_LIST_MAX_PROGSHADER_CORE
GLException
- if no programmable core profile is available for the device.GL_PROFILE_LIST_MAX_PROGSHADER_CORE
public static GLProfile getMaxProgrammableCore(boolean favorHardwareRasterizer) throws GLException
GLException
- if no programmable core profile is available for the default device.GL_PROFILE_LIST_MAX_PROGSHADER_CORE
public static GLProfile getGL2ES1(AbstractGraphicsDevice device) throws GLException
GLProfile.get(device, GLProfile.GL2ES1).getImpl());
Selection favors hardware rasterizer.
GLException
- if no GL2ES1 compatible profile is available for the default device.isGL2ES1()
,
get(AbstractGraphicsDevice, String)
,
getImpl()
public static GLProfile getGL2ES1() throws GLException
getGL2ES1(AbstractGraphicsDevice)
using the default device.
Selection favors hardware rasterizer.
GLException
getGL2ES1(AbstractGraphicsDevice)
public static GLProfile getGL2ES2(AbstractGraphicsDevice device) throws GLException
GLProfile.get(device, GLProfile.GL2ES2).getImpl());
Selection favors hardware rasterizer.
GLException
- if no GL2ES2 compatible profile is available for the default device.isGL2ES2()
,
get(AbstractGraphicsDevice, String)
,
getImpl()
public static GLProfile getGL2ES2() throws GLException
getGL2ES2(AbstractGraphicsDevice)
using the default device.
Selection favors hardware rasterizer.
GLException
getGL2ES2(AbstractGraphicsDevice)
public static GLProfile getGL4ES3(AbstractGraphicsDevice device) throws GLException
GLProfile.get(device, GLProfile.GL4ES3).getImpl());
Selection favors hardware rasterizer.
GLException
- if no GL4ES3 compatible profile is available for the default device.isGL4ES3()
,
get(AbstractGraphicsDevice, String)
,
getImpl()
public static GLProfile getGL4ES3() throws GLException
getGL4ES3(AbstractGraphicsDevice)
using the default device.
Selection favors hardware rasterizer.
GLException
getGL4ES3(AbstractGraphicsDevice)
public static GLProfile getGL2GL3(AbstractGraphicsDevice device) throws GLException
GLProfile.get(device, GLProfile.GL2GL3).getImpl());
Selection favors hardware rasterizer.
GLException
- if no GL2GL3 compatible profile is available for the default device.isGL2GL3()
,
get(AbstractGraphicsDevice, String)
,
getImpl()
public static GLProfile getGL2GL3() throws GLException
getGL2GL3(AbstractGraphicsDevice)
using the default device.
Selection favors hardware rasterizer.
GLException
getGL2GL3(AbstractGraphicsDevice)
public static GLProfile get(AbstractGraphicsDevice device, String profile) throws GLException
null
or GL
will result in
the default profile.device
- a valid AbstractGraphicsDevice, or null for the default device.
profile
- a valid GLProfile name (GL4bc
, GL4
, GL2
, ..),
or [ null, GL ]
for the default profile.GLException
- if the requested profile is not available for the device.public static GLProfile get(String profile) throws GLException
profile
- a valid GLProfile name (GL4bc
, GL4
, GL2
, ..),
or [ null, GL ]
for the default profile.GLException
- if the requested profile is not available for the default device.public static GLProfile get(AbstractGraphicsDevice device, String[] profiles, boolean favorHardwareRasterizer) throws GLException
device
- a valid AbstractGraphicsDevice, or null 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.GLException
- if the non of the requested profiles is available for the device.public static GLProfile get(String[] profiles, boolean favorHardwareRasterizer) throws GLException
profiles
- array of valid GLProfile name (GL4bc
, GL4
, GL2
, ..)favorHardwareRasterizer
- set to true, if hardware rasterizer shall be favored, otherwise false.GLException
- if the non of the requested profiles is available for the default device.public static boolean usesNativeGLES1(String profileImpl)
public static boolean usesNativeGLES2(String profileImpl)
public static boolean usesNativeGLES3(String profileImpl)
public static boolean usesNativeGLES(String profileImpl)
public static boolean isAWTAvailable()
NativeWindowFactory.isAWTAvailable()
and
JOGL's AWT partpublic static String getGLTypeName(int type)
public static String getGLArrayName(int array)
public final String getGLImplBaseClassName()
public final Constructor<?> getGLCtor(boolean glObject)
public final boolean equals(Object o)
public final void verifyEquality(GLProfile glp) throws GLException
glp
- GLProfile to compare withGLException
- if given GLProfile and this aren't equalpublic final String getName()
public final GLProfile getImpl()
public final boolean isHardwareRasterizer()
public final String getImplName()
public final boolean isGL4bc()
Includes [ GL4bc ].
public final boolean isGL4()
Includes [ GL4bc, GL4 ].
public final boolean isGL3bc()
Includes [ GL4bc, GL3bc ].
public final boolean isGL3()
Includes [ GL4bc, GL4, GL3bc, GL3 ].
public final boolean isGL2()
Includes [ GL4bc, GL3bc, GL2 ].
public final boolean isGLES1()
Includes [ GLES1 ].
public final boolean isGLES2()
Includes [ GLES2, GLES3 ].
public final boolean isGLES3()
Includes [ GLES3 ].
public final boolean isGLES()
Includes [ GLES1, GLES2, GLES3 ].
public final boolean isGL2ES1()
Includes [ GL4bc, GL3bc, GL2, GLES1, GL2ES1 ].
public final boolean isGL2GL3()
Includes [ GL4bc, GL4, GL3bc, GL3, GL2, GL2GL3 ].
public final boolean isGL2ES2()
Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL2, GL2GL3, GL2ES2, GLES2 ].
public final boolean isGL2ES3()
Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL3ES3, GL2, GL2GL3 ].
isGL3ES3()
,
isGL2GL3()
public final boolean isGL3ES3()
Includes [ GL4bc, GL4, GL3bc, GL3, GLES3 ].
public final boolean isGL4ES3()
Includes [ GL4bc, GL4, GLES3 ].
public final boolean hasGLSL()
isGL2ES2()
.public final boolean usesNativeGLES1()
public final boolean usesNativeGLES2()
public final boolean usesNativeGLES3()
public final boolean usesNativeGLES()
public boolean isValidDataType(int type, boolean throwException)
public boolean isValidArrayDataType(int index, int comps, int type, boolean isVertexAttribPointer, boolean throwException)
public static AbstractGraphicsDevice getDefaultDevice()
Copyright 2010 JogAmp Community.