|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.opengl.GLProfile
public class GLProfile
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, using GLProfile#GetProfileDefault()
,
or more specialized versions using the other static GetProfile methods.
Field Summary | |
---|---|
static boolean |
DEBUG
|
static String[] |
GL_PROFILE_LIST_ALL
All GL Profiles in the order of default detection. |
static String[] |
GL_PROFILE_LIST_GL2ES1
All GL2ES1 Profiles in the order of default detection. |
static String[] |
GL_PROFILE_LIST_GL2ES2
All GL2ES2 Profiles in the order of default detection. |
static String[] |
GL_PROFILE_LIST_MAX_FIXEDFUNC
Order of maximum fixed function profiles GL4bc GL3bc GL2 GL2ES1 GLES1 |
static String[] |
GL_PROFILE_LIST_MAX_PROGSHADER
Order of maximum programmable shader profiles GL4 GL4bc GL3 GL3bc GL2 GL2ES2 GLES2 |
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 |
GLES1
The embedded OpenGL profile ES 1.x, with x >= 0 |
static String |
GLES2
The embedded OpenGL profile ES 2.x, with x >= 0 |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
static GLProfile |
get(AbstractGraphicsDevice device,
String profile)
Returns a GLProfile object. |
static GLProfile |
get(AbstractGraphicsDevice device,
String[] profiles)
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)
Uses the default device |
static GLProfile |
getDefault()
Uses the default device |
static GLProfile |
getDefault(AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform. |
static AbstractGraphicsDevice |
getDefaultDesktopDevice()
|
static AbstractGraphicsDevice |
getDefaultDevice()
|
static AbstractGraphicsDevice |
getDefaultEGLDevice()
|
static GLProfile |
getGL2ES1()
Uses the default device |
static GLProfile |
getGL2ES1(AbstractGraphicsDevice device)
Returns a profile, implementing the interface GL2ES1. |
static GLProfile |
getGL2ES2()
Uses the default device |
static GLProfile |
getGL2ES2(AbstractGraphicsDevice device)
Returns a profile, implementing the interface GL2ES2. |
static String |
getGLArrayName(int array)
|
String |
getGLImplBaseClassName()
|
static String |
getGLTypeName(int type)
|
String |
getImplName()
|
static GLProfile |
getMaxFixedFunc()
Uses the default device |
static GLProfile |
getMaxFixedFunc(AbstractGraphicsDevice device)
Returns the highest profile, implementing the fixed function pipeline It selects the first of the set: GL_PROFILE_LIST_MAX_FIXEDFUNC |
static GLProfile |
getMaxProgrammable()
Uses the default device |
static GLProfile |
getMaxProgrammable(AbstractGraphicsDevice device)
Returns the highest profile, implementing the programmable shader pipeline. |
String |
getName()
|
static String |
glAvailabilityToString()
Uses the default device |
static String |
glAvailabilityToString(AbstractGraphicsDevice device)
|
boolean |
hasGLSL()
Indicates whether this profile supports GLSL. |
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(boolean firstUIActionOnProcess)
Static one time initialization of JOGL. |
static boolean |
isAWTAvailable()
|
boolean |
isGL2()
Indicates whether this context is a GL2 context |
static boolean |
isGL2Available()
Uses the default device |
static boolean |
isGL2Available(AbstractGraphicsDevice device)
|
boolean |
isGL2ES1()
Indicates whether this profile is capable of GL2ES1. |
static boolean |
isGL2ES1Available()
Uses the default device |
static boolean |
isGL2ES1Available(AbstractGraphicsDevice device)
|
boolean |
isGL2ES2()
Indicates whether this profile is capable os GL2ES2. |
static boolean |
isGL2ES2Available()
Uses the default device |
static boolean |
isGL2ES2Available(AbstractGraphicsDevice device)
|
boolean |
isGL2GL3()
Indicates whether this profile is capable os GL2GL3. |
boolean |
isGL3()
Indicates whether this profile is capable of GL3. |
static boolean |
isGL3Available()
Uses the default device |
static boolean |
isGL3Available(AbstractGraphicsDevice device)
|
boolean |
isGL3bc()
Indicates whether this profile is capable of GL3bc. |
static boolean |
isGL3bcAvailable()
Uses the default device |
static boolean |
isGL3bcAvailable(AbstractGraphicsDevice device)
|
boolean |
isGL4()
Indicates whether this profile is capable of GL4. |
static boolean |
isGL4Available()
Uses the default device |
static boolean |
isGL4Available(AbstractGraphicsDevice device)
|
boolean |
isGL4bc()
Indicates whether this profile is capable of GL4bc. |
static boolean |
isGL4bcAvailable()
Uses the default device |
static boolean |
isGL4bcAvailable(AbstractGraphicsDevice device)
|
boolean |
isGLES1()
Indicates whether this profile is capable of GLES1. |
static boolean |
isGLES1Available()
Uses the default device |
static boolean |
isGLES1Available(AbstractGraphicsDevice device)
|
boolean |
isGLES2()
Indicates whether this profile is capable of GLES2. |
static boolean |
isGLES2Available()
Uses the default device |
static boolean |
isGLES2Available(AbstractGraphicsDevice device)
|
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 here. Invoke shutdown() manually is recommended, due to the unreliable JVM state within the shutdown hook. |
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 ES2 profile is in use. |
void |
verifyEquality(GLProfile glp)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
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 GL2ES1
public static final String GL2ES2
public static final String GL2GL3
public static final String[] GL_PROFILE_LIST_ALL
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_GL2ES2
public static final String[] GL_PROFILE_LIST_GL2ES1
Method Detail |
---|
public static void initSingleton(boolean firstUIActionOnProcess)
Applications shall call this methods ASAP, before any other UI invocation.
You may issue the call in your main function.
In case applications are able to initialize JOGL before any other UI action,
they shall invoke this method with firstUIActionOnProcess=true
and benefit from fast native multithreading support on all platforms if possible.
RCP Application (Applet's, Webstart, Netbeans, ..) using JOGL may not be able to initialize JOGL
before the first UI action.
In such case you shall invoke this method with firstUIActionOnProcess=false
.
On some platforms, notably X11 with AWT usage, JOGL will utilize special locking mechanisms which may slow down your
application.
Remark: NEWT is currently not affected by this behavior, ie always uses native multithreading.
However, in case this method is not invoked, hence GLProfile is not initialized explicitly by the user,
the first call to getDefault()
, get(java.lang.String)
, etc, will initialize with firstUIActionOnProcess=false
,
hence without the possibility to enable native multithreading.
This is not the recommended way, since it may has a performance impact, but it allows you to run code without explicit initialization.
In case no explicit initialization was invoked and the implicit initialization didn't happen,
you may encounter the following exception:
javax.media.opengl.GLException: No default profile available
firstUIActionOnProcess
- Should be true
if called before the first UI action of the running program,
otherwise false
.public static void initProfiles(AbstractGraphicsDevice device)
public static void shutdown()
GLDrawableFactory.shutdown()
.shutdown()
manually is recommended, due to the unreliable JVM state within the shutdown hook.
public static boolean isGL4bcAvailable(AbstractGraphicsDevice device)
public static boolean isGL4Available(AbstractGraphicsDevice device)
public static boolean isGL3bcAvailable(AbstractGraphicsDevice device)
public static boolean isGL3Available(AbstractGraphicsDevice device)
public static boolean isGL2Available(AbstractGraphicsDevice device)
public static boolean isGLES2Available(AbstractGraphicsDevice device)
public static boolean isGLES1Available(AbstractGraphicsDevice device)
public static boolean isGL2ES1Available(AbstractGraphicsDevice device)
public static boolean isGL2ES2Available(AbstractGraphicsDevice device)
public static boolean isGL4bcAvailable()
public static boolean isGL4Available()
public static boolean isGL3bcAvailable()
public static boolean isGL3Available()
public static boolean isGL2Available()
public static boolean isGLES2Available()
public static boolean isGLES1Available()
public static boolean isGL2ES1Available()
public static boolean isGL2ES2Available()
public static String glAvailabilityToString(AbstractGraphicsDevice device)
public static String glAvailabilityToString()
public static GLProfile getDefault(AbstractGraphicsDevice device)
GL_PROFILE_LIST_ALL
GL_PROFILE_LIST_ALL
public static GLProfile getDefault()
public static GLProfile getMaxFixedFunc(AbstractGraphicsDevice device) throws GLException
GL_PROFILE_LIST_MAX_FIXEDFUNC
GLException
- if no implementation for the given profile is found.GL_PROFILE_LIST_MAX_FIXEDFUNC
public static GLProfile getMaxFixedFunc() throws GLException
GLException
public static GLProfile getMaxProgrammable(AbstractGraphicsDevice device) throws GLException
GL_PROFILE_LIST_MAX_PROGSHADER
GLException
- if no implementation for the given profile is found.GL_PROFILE_LIST_MAX_PROGSHADER
public static GLProfile getMaxProgrammable() throws GLException
GLException
public static GLProfile getGL2ES1(AbstractGraphicsDevice device) throws GLException
GL_PROFILE_LIST_GL2ES1
GLException
- if no implementation for the given profile is found.GL_PROFILE_LIST_GL2ES1
public static GLProfile getGL2ES1() throws GLException
GLException
public static GLProfile getGL2ES2(AbstractGraphicsDevice device) throws GLException
GL_PROFILE_LIST_GL2ES2
GLException
- if no implementation for the given profile is found.GL_PROFILE_LIST_GL2ES2
public static GLProfile getGL2ES2() throws GLException
GLException
public static GLProfile get(AbstractGraphicsDevice device, String profile) throws GLException
null
or GL
will result in
the default profile.
GLException
- if no implementation for the given profile is found.public static GLProfile get(String profile) throws GLException
GLException
public static GLProfile get(AbstractGraphicsDevice device, String[] profiles) throws GLException
GLException
- if no implementation for the given profile is found.public static GLProfile get(String[] profiles) throws GLException
GLException
public static boolean usesNativeGLES1(String profileImpl)
public static boolean usesNativeGLES2(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 boolean equals(Object o)
equals
in class Object
o
- GLProfile object to compare with
public int hashCode()
hashCode
in class Object
public final void verifyEquality(GLProfile glp) throws GLException
glp
- GLProfile to compare with
GLException
- if given GLProfile and this aren't equalpublic final String getName()
public final String getImplName()
public final boolean isGL4bc()
public final boolean isGL4()
public final boolean isGL3bc()
public final boolean isGL3()
public final boolean isGL2()
public final boolean isGLES1()
public final boolean isGLES2()
public final boolean isGL2ES1()
public final boolean isGL2ES2()
public final boolean isGL2GL3()
public final boolean hasGLSL()
public final boolean usesNativeGLES1()
public final boolean usesNativeGLES2()
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 String toString()
toString
in class Object
public static AbstractGraphicsDevice getDefaultDevice()
public static AbstractGraphicsDevice getDefaultDesktopDevice()
public static AbstractGraphicsDevice getDefaultEGLDevice()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |