javax.media.opengl
Class GLProfile

java.lang.Object
  extended by javax.media.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, 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(String profile)
          Returns a GLProfile object.
static GLProfile get(String[] profiles)
          Returns the first profile from the given list, where an implementation is available.
static GLProfile getDefault()
          Returns a default GLProfile object, reflecting the best for the running platform.
static GLProfile getGL2ES1()
          Returns a profile, implementing the interface GL2ES1.
static GLProfile getGL2ES2()
          Returns a profile, implementing the interface GL2ES2.
static String getGLArrayName(int array)
           
 String getGLImplBaseClassName()
           
static String getGLTypeName(int type)
           
 String getImplName()
           
static GLProfile getMaxFixedFunc()
          Returns the highest profile, implementing the fixed function pipeline It selects the first of the set: GL_PROFILE_LIST_MAX_FIXEDFUNC
static GLProfile getMaxProgrammable()
          Returns the highest profile, implementing the programmable shader pipeline.
 String getName()
           
static String glAvailabilityToString()
           
 boolean hasGLSL()
          Indicates whether this profile supports GLSL.
 int hashCode()
           
static void initSingleton()
          It is mandatory to call this methods ASAP, before anything else.
You may issue the call in your main class static initializer block, or in the static main function.
This will kick off JOGL's static initialization.
It is essential to do this at the very beginning, so JOGL has a chance to initialize multithreading support.
static boolean isAWTAvailable()
           
 boolean isGL2()
          Indicates whether this context is a GL2 context
static boolean isGL2Available()
           
 boolean isGL2ES1()
          Indicates whether this profile is capable of GL2ES1.
static boolean isGL2ES1Available()
           
 boolean isGL2ES2()
          Indicates whether this profile is capable os GL2ES2.
static boolean isGL2ES2Available()
           
 boolean isGL2GL3()
          Indicates whether this profile is capable os GL2GL3.
 boolean isGL3()
          Indicates whether this profile is capable of GL3.
static boolean isGL3Available()
           
 boolean isGL3bc()
          Indicates whether this profile is capable of GL3bc.
static boolean isGL3bcAvailable()
           
 boolean isGL4()
          Indicates whether this profile is capable of GL4.
static boolean isGL4Available()
           
 boolean isGL4bc()
          Indicates whether this profile is capable of GL4bc.
static boolean isGL4bcAvailable()
           
 boolean isGLES1()
          Indicates whether this profile is capable of GLES1.
static boolean isGLES1Available()
           
 boolean isGLES2()
          Indicates whether this profile is capable of GLES2.
static boolean isGLES2Available()
           
 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
 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

DEBUG

public static final boolean DEBUG

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

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

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. FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!


GL_PROFILE_LIST_MAX_FIXEDFUNC

public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC
Order of maximum fixed function profiles


GL_PROFILE_LIST_MAX_PROGSHADER

public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER
Order of maximum programmable shader profiles


GL_PROFILE_LIST_GL2ES2

public static final String[] GL_PROFILE_LIST_GL2ES2
All GL2ES2 Profiles in the order of default detection. FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!


GL_PROFILE_LIST_GL2ES1

public static final String[] GL_PROFILE_LIST_GL2ES1
All GL2ES1 Profiles in the order of default detection. FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!

Method Detail

isGL4bcAvailable

public static final boolean isGL4bcAvailable()

isGL4Available

public static final boolean isGL4Available()

isGL3bcAvailable

public static final boolean isGL3bcAvailable()

isGL3Available

public static final boolean isGL3Available()

isGL2Available

public static final boolean isGL2Available()

isGLES2Available

public static final boolean isGLES2Available()

isGLES1Available

public static final boolean isGLES1Available()

isGL2ES1Available

public static final boolean isGL2ES1Available()

isGL2ES2Available

public static final boolean isGL2ES2Available()

glAvailabilityToString

public static final String glAvailabilityToString()

getDefault

public static final GLProfile getDefault()
Returns a default GLProfile object, reflecting the best for the running platform. It selects the first of the set GL_PROFILE_LIST_ALL

See Also:
GL_PROFILE_LIST_ALL

getMaxFixedFunc

public static final GLProfile getMaxFixedFunc()
                                       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 implementation for the given profile is found.
See Also:
GL_PROFILE_LIST_MAX_FIXEDFUNC

getMaxProgrammable

public static final GLProfile getMaxProgrammable()
                                          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 implementation for the given profile is found.
See Also:
GL_PROFILE_LIST_MAX_PROGSHADER

getGL2ES1

public static final GLProfile getGL2ES1()
                                 throws GLException
Returns a profile, implementing the interface GL2ES1. It selects the first of the set: GL_PROFILE_LIST_GL2ES1

Throws:
GLException - if no implementation for the given profile is found.
See Also:
GL_PROFILE_LIST_GL2ES1

getGL2ES2

public static final GLProfile getGL2ES2()
                                 throws GLException
Returns a profile, implementing the interface GL2ES2. It selects the first of the set: GL_PROFILE_LIST_GL2ES2

Throws:
GLException - if no implementation for the given profile is found.
See Also:
GL_PROFILE_LIST_GL2ES2

get

public static final GLProfile get(String profile)
                           throws GLException
Returns a GLProfile object. Verfifies the given profile and chooses an apropriate implementation. A generic value of null or GL will result in the default profile.

Throws:
GLException - if no implementation for the given profile is found.

get

public static final GLProfile get(String[] profiles)
                           throws GLException
Returns the first profile from the given list, where an implementation is available.

Throws:
GLException - if no implementation for the given profile is found.

usesNativeGLES1

public static final boolean usesNativeGLES1(String profileImpl)
Indicates whether the native OpenGL ES1 profile is in use. This requires an EGL interface.


usesNativeGLES2

public static final boolean usesNativeGLES2(String profileImpl)
Indicates whether the native OpenGL ES2 profile is in use. This requires an EGL interface.


usesNativeGLES

public static final boolean usesNativeGLES(String profileImpl)
Indicates whether either of the native OpenGL ES profiles are in use.


getGLImplBaseClassName

public final String getGLImplBaseClassName()

equals

public final boolean equals(Object o)
Overrides:
equals in class Object
Parameters:
o - GLProfile object to compare with
Returns:
true if given Object is a GLProfile and if both, profile and profileImpl is equal with this.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

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()

getImplName

public final String getImplName()

isGL4bc

public final boolean isGL4bc()
Indicates whether this profile is capable of GL4bc.


isGL4

public final boolean isGL4()
Indicates whether this profile is capable of GL4.


isGL3bc

public final boolean isGL3bc()
Indicates whether this profile is capable of GL3bc.


isGL3

public final boolean isGL3()
Indicates whether this profile is capable of GL3.


isGL2

public final boolean isGL2()
Indicates whether this context is a GL2 context


isGLES1

public final boolean isGLES1()
Indicates whether this profile is capable of GLES1.


isGLES2

public final boolean isGLES2()
Indicates whether this profile is capable of GLES2.


isGL2ES1

public final boolean isGL2ES1()
Indicates whether this profile is capable of GL2ES1.


isGL2ES2

public final boolean isGL2ES2()
Indicates whether this profile is capable os GL2ES2.


isGL2GL3

public final boolean isGL2GL3()
Indicates whether this profile is capable os GL2GL3.


hasGLSL

public final boolean hasGLSL()
Indicates whether this profile supports GLSL.


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.


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


isValidArrayDataType

public boolean isValidArrayDataType(int index,
                                    int comps,
                                    int type,
                                    boolean isVertexAttribPointer,
                                    boolean throwException)

toString

public String toString()
Overrides:
toString in class Object

initSingleton

public static void initSingleton()
It is mandatory to call this methods ASAP, before anything else.
You may issue the call in your main class static initializer block, or in the static main function.
This will kick off JOGL's static initialization.
It is essential to do this at the very beginning, so JOGL has a chance to initialize multithreading support.


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)


Copyright 2010 JogAmp Community.