Top Description Fields Constructors Methods
com.jogamp.opengl

public Class GLProfile

extends Object
Class Inheritance
Imports
jogamp.opengl.Debug, .GLDrawableFactoryImpl, .GLDynamicLookupHelper, .DesktopGLDynamicLookupHelper, com.jogamp.common.ExceptionUtils, .GlueGenVersion, com.jogamp.common.jvm.JNILibLoaderBase, com.jogamp.common.os.Platform, com.jogamp.common.util.PropertyAccess, .ReflectionUtil, .VersionUtil, com.jogamp.common.util.cache.TempJarCache, com.jogamp.common.util.locks.LockFactory, .RecursiveThreadGroupLock, com.jogamp.gluegen.runtime.FunctionAddressResolver, com.jogamp.nativewindow.NativeWindowVersion, .AbstractGraphicsDevice, .NativeWindowFactory, com.jogamp.opengl.GLRendererQuirks, .JoglVersion, com.jogamp.opengl.fixedfunc.GLPointerFunc, java.lang.reflect.Constructor, java.security.AccessController, .PrivilegedAction, java.util.HashMap, .List, .Map

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

Modifier and TypeField and Description
private static Constructor<?>
private static Constructor<?>
private static final Class<?>[]
private static Constructor<?>
private static Constructor<?>
private static Constructor<?>
private static Constructor<?>
private static final Class<?>[]
public static final boolean
private static AbstractGraphicsDevice
private static GLDrawableFactoryImpl
private static HashMap<String, HashMap<String, GLProfile>>
public static final 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.

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 property jogl.disable.openglcore disables querying possible existing native OpenGL core profiles.

public static final 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.

public static final 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.

public static final boolean
disableSurfacelessContext

Disable surfaceless OpenGL context capability and its probing by setting the property jogl.disable.surfacelesscontext.

private static GLDrawableFactoryImpl
public static final boolean
enableANGLE

We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome.

public static final String
GL2

The desktop OpenGL profile 1.x up to 3.0

public static final String
GL2ES1

The intersection of the desktop GL2 and embedded ES1 profile

public static final String
GL2ES2

The intersection of the desktop GL3, GL2 and embedded ES2 profile

public static final String
GL2GL3

The intersection of the desktop GL3 and GL2 profile

public static final String
GL3

The desktop OpenGL core profile 3.x, with x >= 1

public static final String
GL3bc

The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.

public static final String
GL4

The desktop OpenGL core profile 4.x, with x >= 0

public static final String
GL4bc

The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.

private static final String
private static final String
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.

private static final String
GL_DEFAULT

The default profile, used for the device default profile map

private static final String
GL_GL

The default profile, used for the device default profile map

public static final String[]
GL_PROFILE_LIST_ALL

All GL Profiles in the order of default detection.

public static final String[]
GL_PROFILE_LIST_MAX

Order of maximum profiles.

public static final String[]
GL_PROFILE_LIST_MAX_FIXEDFUNC

Order of maximum fixed function profiles

  • GL4bc
  • GL3bc
  • GL2
  • GLES1
public static final String[]
GL_PROFILE_LIST_MAX_PROGSHADER

Order of maximum programmable shader profiles

  • GL4bc
  • GL4
  • GL3bc
  • GL3
  • GLES3
  • GL2
  • GLES2
public static final String[]
GL_PROFILE_LIST_MAX_PROGSHADER_CORE

Order of maximum programmable shader core only profiles

  • GL4
  • GL3
  • GLES3
  • GLES2
public static final String[]
GL_PROFILE_LIST_MIN

Order of minimum profiles.

public static final String[]
GL_PROFILE_LIST_MIN_DESKTOP

Order of minimum original desktop profiles.

public static final String
GLES1

The embedded OpenGL profile ES 1.x, with x >= 0

private static final String
private static final String
public static final String
GLES2

The embedded OpenGL profile ES 2.x, with x >= 0

public static final String
GLES3

The embedded OpenGL profile ES 3.x, with x >= 0

private static final String
private static final String
private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
private static boolean
private static final RecursiveThreadGroupLock
private static boolean
private final boolean
private final boolean
private final String
private final GLProfile

Constructor Summary

AccessConstructor and Description
private
GLProfile(final String profile, final GLProfile profileImpl, final boolean isHardwareRasterizer, final boolean isCustom)

Method Summary

Modifier and TypeMethod and Description
private static String
array2String(final String[] list)

private static String
computeProfileImpl(final AbstractGraphicsDevice device, final String profile, final boolean desktopCtxUndef, final boolean esCtxUndef, final boolean[] isHardwareRasterizer)

Returns the profile implementation

private static HashMap<String, GLProfile>
computeProfileMap(final AbstractGraphicsDevice device, final boolean desktopCtxUndef, final boolean esCtxUndef)

public static GLProfile
createCustomGLProfile(final String profile, final GLProfile profileImpl)

private static StringBuilder
doIndent(final StringBuilder sb, final String indent, int indentCount)

private static void
public final boolean

Returns:

true if given Object is a GLProfile and if both, profile and profileImpl is equal with this.
equals
(final Object
GLProfile object to compare with
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public static GLProfile
get(final AbstractGraphicsDevice
a valid AbstractGraphicsDevice, or null for the default device.
device
,
String
a valid GLProfile name (GL4bc, GL4, GL2, ..), or [ null, GL ] for the default profile.
profile
)

Returns a GLProfile object.

public static GLProfile
get(final String
a valid GLProfile name (GL4bc, GL4, GL2, ..), or [ null, GL ] for the default profile.
profile
)

Uses the default device

public static GLProfile
get(final AbstractGraphicsDevice
a valid AbstractGraphicsDevice, or null for the default device.
device
,
final String[]
array of valid GLProfile name (GL4bc, GL4, GL2, ..)
profiles
,
final boolean
set to true, if hardware rasterizer shall be favored, otherwise false.
favorHardwareRasterizer
)

Returns the first profile from the given list, where an implementation is available.

public static GLProfile
get(final String[]
array of valid GLProfile name (GL4bc, GL4, GL2, ..)
profiles
,
final boolean
set to true, if hardware rasterizer shall be favored, otherwise false.
favorHardwareRasterizer
)

Uses the default device

private static final Constructor<?>
getCtor(final String clazzName, final boolean glObject, final ClassLoader cl)

public static GLProfile
getDefault(final AbstractGraphicsDevice device)

Returns a default GLProfile object, reflecting the best for the running platform.

public static GLProfile
getDefault()

Returns a default GLProfile object, reflecting the best for the running platform.

public static AbstractGraphicsDevice
public static GLProfile
getGL2ES1(final AbstractGraphicsDevice device)

Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.

public static GLProfile
getGL2ES1()

Calls getGL2ES1(AbstractGraphicsDevice) using the default device.

public static GLProfile
getGL2ES2(final AbstractGraphicsDevice device)

Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.

public static GLProfile
getGL2ES2()

Calls getGL2ES2(AbstractGraphicsDevice) using the default device.

public static GLProfile
getGL2GL3(final AbstractGraphicsDevice device)

Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.

public static GLProfile
getGL2GL3()

Calls getGL2GL3(AbstractGraphicsDevice) using the default device.

public static GLProfile
getGL4ES3(final AbstractGraphicsDevice device)

Returns the GL4ES3 profile implementation, hence compatible w/ GL4ES3.

public static GLProfile
getGL4ES3()

Calls getGL4ES3(AbstractGraphicsDevice) using the default device.

public static String
getGLArrayName(final int array)

public final Constructor<?>
getGLCtor(final boolean glObject)

private static final Constructor<?>
getGLCtor(final String profileImpl, final boolean glObject)

public final String
private static final String
getGLImplBaseClassName(final String profileImpl)

public static String
getGLTypeName(final int type)

public final GLProfile
getImpl()

return this profiles implementation, eg.

public final String
getImplName()

return this profiles implementation name, eg.

public static GLProfile
getMaxFixedFunc(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)

Returns the highest profile, implementing the fixed function pipeline.

public static GLProfile
getMaxFixedFunc(final boolean favorHardwareRasterizer)

Uses the default device

public static GLProfile
getMaximum(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)

Returns the highest profile.

public static GLProfile
getMaximum(final boolean favorHardwareRasterizer)

Uses the default device

public static GLProfile
getMaxProgrammable(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)

Returns the highest profile, implementing the programmable shader pipeline.

public static GLProfile
getMaxProgrammable(final boolean favorHardwareRasterizer)

Uses the default device

public static GLProfile
getMaxProgrammableCore(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)

Returns the highest profile, implementing the programmable shader core pipeline only.

public static GLProfile
getMaxProgrammableCore(final boolean favorHardwareRasterizer)

Uses the default device

public static GLProfile
getMinimum(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)

Returns the lowest profile.

public static GLProfile
getMinimum(final boolean favorHardwareRasterizer)

Uses the default device

public final String
getName()

return this profiles name

private static HashMap<String, GLProfile>

Returns:

the GLProfile HashMap if exists, otherwise null
getProfileMap
(AbstractGraphicsDevice
the key 'device -> GLProfiles-Map'
device
,
final boolean
true if GLException shall be thrown in case of no mapped profile, otherwise false.
throwExceptionOnZeroProfile
)

This implementation support lazy initialization, while avoiding recursion/deadlocks.

public static String
public static StringBuilder
public static StringBuilder
glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, final String indent, int indentCount)

public static String
glAvailabilityToString()

Uses the default device

private static void
glAvailabilityToString(final AbstractGraphicsDevice device, final StringBuilder sb, final int major, final int profile)

public final boolean
hasGLSL()

Indicates whether this profile supports GLSL, i.e. isGL2ES2().

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
private static final void
public static void
initProfiles(final AbstractGraphicsDevice device)

Trigger eager initialization of GLProfiles for the given device, in case it isn't done yet.

private static void
initProfilesForDefaultDevices()

Tries the profiles implementation and native libraries.

private static boolean

Returns:

true if any profile for the device exists, otherwise false
initProfilesForDevice
(final AbstractGraphicsDevice
the device for which profiles shall be initialized
device
)

private static boolean
public static void
initSingleton()

Static initialization of JOGL.

public static boolean

Returns:

true if any profile is available for the default device, otherwise false.
isAnyAvailable
()

Returns the availability of any profile on the default device.

public static boolean

Returns:

true if the profile is available for the device, otherwise false.
isAvailable
(final AbstractGraphicsDevice
a valid AbstractGraphicsDevice, or null for the default device.
device
,
final String
a valid GLProfile name (GL4bc, GL4, GL2, ..), or [ null, GL ] for the default profile.
profile
)

Returns the availability of a profile on a device.

public static boolean

Returns:

true if the profile is available for the default device, otherwise false.
isAvailable
(final String
a valid GLProfile name (GL4bc, GL4, GL2, ..), or [ null, GL ] for the default profile.
profile
)

Returns the availability of a profile on the default device.

private static boolean
isAvailableImpl(final HashMap<String, GLProfile> map, final String profile)

public static boolean
public final boolean
isGL2()

Indicates whether this profile is capable of GL2 .

public final boolean
isGL2ES1()

Indicates whether this profile is capable of GL2ES1.

public final boolean
isGL2ES2()

Indicates whether this profile is capable of GL2ES2.

public final boolean
isGL2ES3()

Indicates whether this profile is capable of GL2ES3.

public final boolean
isGL2GL3()

Indicates whether this profile is capable of GL2GL3.

public final boolean
isGL3()

Indicates whether this profile is capable of GL3.

public final boolean
isGL3bc()

Indicates whether this profile is capable of GL3bc.

public final boolean
isGL3ES3()

Indicates whether this profile is capable of GL3ES3.

public final boolean
isGL4()

Indicates whether this profile is capable of GL4.

public final boolean
isGL4bc()

Indicates whether this profile is capable of GL4bc.

public final boolean
isGL4ES3()

Indicates whether this profile is capable of GL4ES3.

public final boolean
isGLES()

Indicates whether this profile is capable of GLES.

public final boolean
isGLES1()

Indicates whether this profile is capable of GLES1.

public final boolean
isGLES2()

Indicates whether this profile is capable of GLES2.

public final boolean
isGLES3()

Indicates whether this profile is capable of GLES3.

public final boolean
isHardwareRasterizer()

return true if impl.

public static boolean

Returns:

true if JOGL has been initialized, i.e. manually via initSingleton() or implicit, otherwise returns false.
isInitialized
()

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

public boolean
isValidDataType(final int type, final boolean throwException)

General validation if type is a valid GL data type for the current profile

private static void
setProfileMap(final AbstractGraphicsDevice device, final HashMap<String, GLProfile> mappedProfiles)

public static void
shutdown()

Manual shutdown method, may be called after your last JOGL use within the running JVM.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public static boolean
usesNativeGLES(final String profileImpl)

Indicates whether either of the native OpenGL ES profiles are in use.

public final boolean
usesNativeGLES()

Indicates whether this profile uses either of the native OpenGL ES implementations.

public static boolean
usesNativeGLES1(final String profileImpl)

Indicates whether the native OpenGL ES1 profile is in use.

public final boolean
usesNativeGLES1()

Indicates whether this profile uses the native OpenGL ES1 implementations.

public static boolean
usesNativeGLES2(final String profileImpl)

Indicates whether the native OpenGL ES3 or ES2 profile is in use.

public final boolean
usesNativeGLES2()

Indicates whether this profile uses the native OpenGL ES2 implementations.

public static boolean
usesNativeGLES3(final String profileImpl)

Indicates whether the native OpenGL ES2 profile is in use.

public final boolean
usesNativeGLES3()

Indicates whether this profile uses the native OpenGL ES3 implementations.

public final void
verifyEquality(final GLProfile
GLProfile to compare with
glp
)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait