Top Description Fields Constructors Methods
com.jogamp.opengl

public abstract Class GLContext

extends Object
Class Inheritance
Known Direct Subclasses
jogamp.opengl.GLContextImpl
Imports
java.nio.IntBuffer, java.util.HashMap, .IdentityHashMap, .Iterator, .List, .Set, com.jogamp.nativewindow.AbstractGraphicsDevice, .NativeSurface, jogamp.opengl.Debug, .GLContextImpl, .GLContextShareSet, com.jogamp.common.os.Platform, com.jogamp.common.util.VersionNumber, .VersionNumberString, com.jogamp.common.util.locks.LockFactory, .RecursiveLock, com.jogamp.opengl.GLExtensions, .GLRendererQuirks

Abstraction for an OpenGL rendering context. In order to perform OpenGL rendering, a context must be "made current" on the current thread. OpenGL rendering semantics specify that only one context may be current on the current thread at any given time, and also that a given context may be current on only one thread at any given time. Because components can be added to and removed from the component hierarchy at any time, it is possible that the underlying OpenGL context may need to be destroyed and recreated multiple times over the lifetime of a given component. This process is handled by the implementation, and the GLContext abstraction provides a stable object which clients can use to refer to a given context.

Field Summary

Modifier and TypeField and Description
private final HashMap<String, Object>
public static final int
CONTEXT_CURRENT

Indicates that the context was made current during the last call to makeCurrent, value .

public static final int
CONTEXT_CURRENT_NEW

Indicates that a newly-created context was made current during the last call to makeCurrent, value .

public static final int
CONTEXT_NOT_CURRENT

Indicates that the context was not made current during the last call to makeCurrent, value .

protected volatile long
contextHandle

The underlying native OpenGL context

protected static final int
CTX_IMPL_ACCEL_SOFT

Context uses software rasterizer, otherwise hardware rasterizer.

protected static final int
CTX_IMPL_CACHE_MASK

Context option bits, cached bit mask covering 10 bits [0..9], i.e. 0x000003FF, .

protected static final int
CTX_IMPL_ES2_COMPAT

GL_ARB_ES2_compatibility implementation related: Context is compatible w/ ES2.

protected static final int
CTX_IMPL_ES31_COMPAT

GL_ARB_ES3_1_compatibility implementation related: Context is compatible w/ ES 3.1.

protected static final int
CTX_IMPL_ES32_COMPAT

GL_ARB_ES3_2_compatibility implementation related: Context is compatible w/ ES 3.2.

protected static final int
CTX_IMPL_ES3_COMPAT

GL_ARB_ES3_compatibility implementation related: Context is compatible w/ ES3.

protected static final int
CTX_IMPL_FBO

Context supports basic FBO, details see hasBasicFBOSupport().

protected static final int
CTX_IMPL_FP32_COMPAT_API

Context supports OES_single_precision, fp32, fixed function point (FFP) compatibility entry points, see hasFP32CompatAPI().

protected static final int
CTX_IMPL_FULL_MASK

Context option bits, full bit mask covering 16 bits [0..15], i.e. 0x0000FFFF, .

protected static final int
CTX_IS_ARB_CREATED

ARB_create_context related: created via ARB_create_context.

public static final int
CTX_OPTION_DEBUG

ARB_create_context related: flag debug.

protected static final int
CTX_OPTION_FORWARD

ARB_create_context related: flag forward compatible.

protected static final int
CTX_PROFILE_COMPAT

ARB_create_context related: desktop compatibility profile.

protected static final int
CTX_PROFILE_CORE

ARB_create_context related: desktop core profile.

protected static final int
CTX_PROFILE_ES

ARB_create_context related: ES profile.

protected VersionNumber
protected int
protected VersionNumberString
protected VersionNumber
protected String
private static final ThreadLocal<GLContext>
protected int
public static final boolean
public static final boolean
DEBUG_GL

Reflects property jogl.debug.DebugGL.

public static final boolean
protected static final IdentityHashMap<String, Integer>
private static final IdentityHashMap<String, String>
protected boolean
drawableRetargeted

Did the drawable association changed ?

public static final int[][]
protected static final boolean
protected static final boolean
protected static final boolean
public static final int[][]
protected GLRendererQuirks
protected final RecursiveLock
public static final boolean
PROFILE_ALIASING

If true (default), bootstrapping the available GL profiles will use the highest compatible GL context for each profile, hence skipping querying lower profiles if a compatible higher one is found:

  • 4.2-core -> 4.2-core, 3.3-core
  • 4.2-comp -> 4.2-comp, 3.3-comp, 2
private static final String
public static final boolean
TRACE_GL

Reflects property jogl.debug.TraceGL.

public static final boolean
public static final VersionNumber
Version1_0

Version 1.00, i.e. GLSL 1.00 for ES 2.0.

public static final VersionNumber
Version1_1

Version 1.1, i.e. GL 1.1

public static final VersionNumber
Version1_10

Version 1.10, i.e. GLSL 1.10 for GL 2.0.

public static final VersionNumber
Version1_2

Version 1.2, i.e. GL 1.2

public static final VersionNumber
Version1_20

Version 1.20, i.e. GLSL 1.20 for GL 2.1.

public static final VersionNumber
Version1_30

Version 1.30, i.e. GLSL 1.30 for GL 3.0.

public static final VersionNumber
Version1_4

Version 1.4, i.e. GL 1.4

public static final VersionNumber
Version1_40

Version 1.40, i.e. GLSL 1.40 for GL 3.1.

public static final VersionNumber
Version1_5

Version 1.5, i.e. GL 1.5

public static final VersionNumber
Version1_50

Version 1.50, i.e. GLSL 1.50 for GL 3.2.

public static final VersionNumber
Version3_0

Version 3.0.

public static final VersionNumber
Version3_1

Version 3.1.

public static final VersionNumber
Version3_2

Version 3.2.

public static final VersionNumber
Version4_3

Version 4.3.

protected static final VersionNumber

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract void
public final StringBuilder
private static boolean
appendString(final StringBuilder sb, final String string, boolean needColon, final boolean condition)

public final Object
attachObject(final String name, final Object obj)

Sets the attached user object for the given name to this GLContext.

public final boolean
bindSwapBarrier(final int group, final int barrier)

protected boolean
bindSwapBarrierImpl(final int group, final int barrier)

public static final boolean

Returns:

true if clipped, i.e. given value exceeds maximum, otherwise false.
clipGLVersion
(final int ctxProfile, final int[] major, final int[] minor)

Clip the given GL version to the maximum known valid version if exceeding.

protected static int
composeBits(final int a8, final int b8, final int c16)

public abstract void
copy(GLContext
the source OpenGL context from which to copy state
source
,
int
a mask of symbolic names indicating which groups of state to copy
mask
)

Copies selected groups of OpenGL state variables from the supplied source context into this one.

protected static VersionNumber
decomposeBits(final int bits32, final int[] ctp)

public static final boolean
decrementGLVersion(final int ctxProfile, final int[] major, final int[] minor)

Decrement the given GL version by one and return true if still valid, otherwise false.

public abstract void
destroy()

Destroys this OpenGL context and frees its associated resources.

public final Object
detachObject(final String name)

protected static StringBuilder
public abstract void
enableGLDebugMessage(boolean
If true enables, otherwise disables the GLDebugOutput feature.
enable
)

Enables or disables the GLDebugOutput feature of extension GLExtensions#ARB_debug_output or GLExtensions#AMD_debug_output, if available.

public final Object
getAttachedObject(final String name)

Returns the attached user object for the given name to this GLContext.

protected static final int

Returns:

the GLProfile's context property (CTP) if available, otherwise 0
getAvailableContextProperties
(final AbstractGraphicsDevice
the device the context profile is being requested for
device
,
final GLProfile
the GLProfile the context profile is being requested for
glp
)

protected static GLProfile

Returns:

the highest GLProfile for the device regarding availability, version and profile bits.
getAvailableGLProfile
(final AbstractGraphicsDevice
the device the profile is being requested
device
,
final int
Key Value either 1, 2, 3 or 4
reqMajor
,
final int reqProfile)

pack-priv static String

Returns:

the highest GLProfile name for the device regarding availability, version and profile bits.
getAvailableGLProfileName
(final AbstractGraphicsDevice
the device the profile is being requested
device
,
final int
Key Value either 1, 2, 3 or 4
reqMajor
,
final int reqProfile)

protected static Integer

Returns:

the available GL version as encoded with {@link #composeBits(int, int, int), otherwise null
getAvailableGLVersion
(final AbstractGraphicsDevice
the device to request whether the profile is available for
device
,
final int
Key Value either 1, 2, 3 or 4
reqMajor
,
final int reqProfile)

protected static boolean
getAvailableGLVersion(final AbstractGraphicsDevice device, final int
Key Value either 1, 2, 3 or 4
reqMajor
,
final int reqProfile, final int[]
if not null, returns the used major version
major
,
final int[]
if not null, returns the used minor version
minor
,
final int[]
if not null, returns the used context profile
ctp
)

protected static String
getAvailableGLVersionAsString(final AbstractGraphicsDevice
the device the profile is being requested
device
,
final int
Key Value either 1, 2, 3 or 4
major
,
final int profile)

protected static boolean
public abstract int
getBoundFramebuffer(int target)

Return the framebuffer name bound to this context, see GL#glBindFramebuffer(int, int).

public abstract int

Returns:

Additional context creation flags, supported: GLContext#CTX_OPTION_DEBUG.
getContextCreationFlags
()

public final List<GLContext>
getCreatedShares()

Returns a new list of created GLContext shared with this GLContext.

public static GLContext

Returns:

the context current on this thread, or null if no context is current.
getCurrent
()

Returns this thread current context.

public static GL

Returns:

the current context's GL object on this thread
getCurrentGL
()

Returns the GL object bound to this thread current context.

public abstract int
getDefaultDrawFramebuffer()

Return the default draw framebuffer name.

public abstract int
getDefaultPixelDataFormat()

Get the default pixel data format, as required by e.g. GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer).

public abstract int
getDefaultPixelDataType()

Get the default pixel data type, as required by e.g. GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer).

public abstract int
getDefaultReadBuffer()

Returns the default color buffer within the current bound getDefaultReadFramebuffer(), i.e. GL_READ_FRAMEBUFFER​, which will be used as the source for pixel reading commands, like glReadPixels etc.

For offscreen framebuffer objects this is GL#GL_COLOR_ATTACHMENT0, otherwise this is GL#GL_FRONT for single buffer configurations and GL#GL_BACK for double buffer configurations.

public abstract int
getDefaultReadFramebuffer()

Return the default read framebuffer name.

public abstract int
getDefaultVAO()

If this GLContext does not implement a default VAO, see hasNoDefaultVAO(), an own default VAO will be created and bound at context creation.

public final List<GLContext>
getDestroyedShares()

Returns a new list of destroyed GLContext shared with this GLContext.

protected static String
getDeviceVersionAvailableKey(final AbstractGraphicsDevice device, final int major, final int profile)

Returns a unique String object using String#intern() for the given arguments, which object reference itself can be used as a key.

public abstract GL

Returns:

the aggregated GL instance, or null if this context was not yet made current.
getGL
()

Returns the GL pipeline object for this GLContext.

private static final int
public abstract String

Returns:

The extension implementing the GLDebugOutput feature, either GLExtensions#ARB_debug_output or GLExtensions#AMD_debug_output. If unavailable or called before initialized via makeCurrent(), null is returned.
getGLDebugMessageExtension
()

public abstract GLDrawable
getGLDrawable()

Returns the write-drawable this context uses for framebuffer operations.

public abstract int
getGLExtensionCount()

Returns the number of OpenGL extensions

public abstract String
getGLExtensionsString()

Returns a non-null (but possibly empty) string containing the space-separated list of available extensions.

protected static String
getGLProfile(final int major, final int minor, final int ctp)

returns the highest GLProfile string regarding the implementation version and context profile bits.

protected static StringBuilder
getGLProfile(final StringBuilder sb, final int ctp)

public abstract GLDrawable
getGLReadDrawable()

Returns the read-Drawable this context uses for read framebuffer operations.

public final VersionNumber

Returns:

GLSL version number if context has been made current at least once, otherwise the zero version instance is returned.
getGLSLVersionNumber
()

Returns the matching GLSL version number, queried by this context GL via GL2ES2#GL_SHADING_LANGUAGE_VERSION if ≥ ES2.0 or GL2.0, otherwise a static match is being utilized.

public final String
getGLSLVersionString()

Returns the GLSL version string as to be used in a shader program, including a terminating newline '\n', i.e. for desktop

   #version 110
   ..
public final VersionNumberString
getGLVendorVersionNumber()

Returns the vendor's version, i.e. version number at the end of GL_VERSION not being the GL version.

public final String
getGLVersion()

Returns a valid OpenGL version string, ie

    major.minor ([option]?[options,]*) - gl-version
protected static StringBuilder
getGLVersion(final StringBuilder sb, final VersionNumber version, final int ctp, final String gl_version)

protected static StringBuilder
getGLVersion(final StringBuilder sb, final int major, final int minor, final int ctp, final String gl_version)

protected static String
getGLVersion(final int major, final int minor, final int ctp, final String gl_version)

public final VersionNumber
getGLVersionNumber()

Returns this context OpenGL version.

public final long
getHandle()

Returns the underlying native OpenGL context handle

public static final int
getMaxMajor(final int ctxProfile)

public static final int
getMaxMinor(final int ctxProfile, final int major)

public final int
getMaxRenderbufferSamples()

Returns the maximum number of FBO RENDERBUFFER samples if full FBO is supported, otherwise false.

public abstract int
getPlatformExtensionCount()

Returns the number of platform extensions

public abstract String
getPlatformExtensionsString()

Returns a non-null (but possibly empty) string containing the space-separated list of available platform-dependent (e.g., WGL, GLX) extensions.

public final GLRendererQuirks

Returns:

instance of GLRendererQuirks if context was made current once, otherwise null.
getRendererQuirks
()

Returns the instance of GLRendererQuirks, allowing one to determine workarounds.

protected static final void
getRequestMajorAndCompat(final GLProfile glp, final int[] reqMajorCTP)

Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request.

public abstract GL
getRootGL()

Returns the implementing root GL instance of this GLContext's GL object, considering a wrapped pipelined hierarchy, see GLBase#getDownstreamGL().

public final GLContext
getSharedMaster()

Returns the shared master GLContext of this GLContext if shared, otherwise return null.

protected static final VersionNumber
getStaticGLSLVersionNumber(final int glMajorVersion, final int glMinorVersion, final int ctxOptions)

public int
public int
getSwapInterval()

Return the current swap interval.

protected static String
public abstract void
glDebugMessageControl(int source, int type, int severity, int count, IntBuffer ids, boolean enabled)

Generic entry for GL2GL3#glDebugMessageControl(int, int, int, int, IntBuffer, boolean) and GL2GL3#glDebugMessageEnableAMD(int, int, int, IntBuffer, boolean) of the GLDebugOutput feature.

public abstract void
glDebugMessageControl(int source, int type, int severity, int count, int[] ids, int ids_offset, boolean enabled)

Generic entry for GL2GL3#glDebugMessageControl(int, int, int, int, int[], int, boolean) and GL2GL3#glDebugMessageEnableAMD(int, int, int, int[], int, boolean) of the GLDebugOutput feature.

public abstract void
glDebugMessageInsert(int source, int type, int id, int severity, String buf)

Generic entry for GL2GL3#glDebugMessageInsert(int, int, int, int, int, String) and GL2GL3#glDebugMessageInsertAMD(int, int, int, int, String) of the GLDebugOutput feature.

public final boolean
hasBasicFBOSupport()

Returns true if basic FBO support is available, otherwise false.

public final boolean
hasFP32CompatAPI()

Returns true if OES_single_precision, fp32, fixed function point (FFP) compatibility entry points available, otherwise false.

public final boolean
hasFullFBOSupport()

Returns true if full FBO support is available, otherwise false.

public final boolean

Returns:

true if context supports GLSL, i.e. is either isGLES3(), isGLES2(), isGL3() or isGL2() and major-version > 1.
hasGLSL
()

public final boolean
hasNoDefaultVAO()

Indicates whether this GLContext's native profile does not implement a default vertex array object (VAO), starting w/ OpenGL 3.1 core.

public final boolean
hasRendererQuirk(final int
the quirk to be tested, e.g. GLRendererQuirks#NoDoubleBufferedPBuffer.
quirk
)

Returns true if the quirk exist in getRendererQuirks(), otherwise false.

public final boolean
isCPUDataSourcingAvail()

Indicates whether this GLContext allows CPU data sourcing (indices, vertices ..) as opposed to using a GPU buffer source (VBO), e.g. GL2#glDrawElements(int, int, int, java.nio.Buffer).

public final boolean
isCreated()

Indicates whether the underlying native OpenGL context has been created.

public final boolean
public final boolean

Returns:

true if this GLContext is current on this thread
isCurrent
()

public abstract boolean
isExtensionAvailable(String
the name of the OpenGL extension (e.g., "GL_VERTEX_PROGRAM_ARB").
glExtensionName
)

Returns true if the specified OpenGL extension can be successfully called using this GL context given the current host (OpenGL client) and display (OpenGL server) configuration.

public static final boolean
isFBOAvailable(final AbstractGraphicsDevice
the device to request whether FBO is available for
device
,
final GLProfile
GLProfile to check for FBO capabilities
glp
)

Returns true if it is possible to create an framebuffer object (FBO).

public abstract boolean
isFunctionAvailable(String
the name of the OpenGL function (e.g., use "glPolygonOffsetEXT" or "glPolygonOffset" to check if the com.jogamp.opengl.GL#glPolygonOffset(float, float) is available).
glFunctionName
)

Returns true if the specified OpenGL core- or extension-function can be successfully called using this GL context given the current host (OpenGL client) and display (OpenGL server) configuration.

public final boolean
isGL2()

Indicates whether this GLContext is capable of GL2.

public static boolean
isGL2Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGL2ES1()

Indicates whether this GLContext is capable of GL2ES1.

public final boolean
isGL2ES2()

Indicates whether this GLContext is capable of GL2ES2.

public final boolean
isGL2ES3()

Indicates whether this GLContext is capable of GL2ES3.

public final boolean
isGL2GL3()

Indicates whether this GLContext is capable of GL2GL3.

public final boolean
isGL3()

Indicates whether this GLContext is capable of GL3.

public static boolean
isGL3Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGL3bc()

Indicates whether this GLContext is capable of GL3bc.

public static boolean
isGL3bcAvailable(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGL3core()

Indicates whether this GLContext uses a GL3 core profile.

public final boolean
isGL3ES3()

Indicates whether this GLContext is capable of GL3ES3.

public final boolean
isGL4()

Indicates whether this GLContext is capable of GL4.

public static boolean
isGL4Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGL4bc()

Indicates whether this GLContext is capable of GL4bc.

public static boolean
isGL4bcAvailable(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGL4core()

Indicates whether this GLContext uses a GL4 core profile.

public final boolean
isGL4ES3()

Returns true if this profile is capable of GL4ES3, i.e. if isGLES3Compatible() returns true.

public final boolean
public final boolean
isGLcore()

Indicates whether this GLContext uses a GL core profile.

public final boolean
public final boolean
public abstract boolean

Returns:

true if the GLDebugOutput feature is enabled or not.
isGLDebugMessageEnabled
()

public abstract boolean

Returns:

the current synchronous debug behavior, set via setGLDebugSynchronous(boolean).
isGLDebugSynchronous
()

public final boolean
isGLES()

Indicates whether this GLContext is capable of GLES.

public final boolean
isGLES1()

Indicates whether this GLContext is capable of GLES1.

public static boolean
isGLES1Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGLES2()

Indicates whether this GLContext is capable of GLES2.

public static boolean
isGLES2Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean

Returns:

true if this context is an ES2 context or implements the extension GL_ARB_ES3_compatibility or GL_ARB_ES2_compatibility, otherwise false
isGLES2Compatible
()

public final boolean
isGLES3()

Indicates whether this GLContext is capable of GLES3.

public final boolean
isGLES31Compatible()

Return true if this context is an ES3 context ≥ 3.1 or implements the extension GL_ARB_ES3_1_compatibility, otherwise false.

public static final boolean
isGLES31CompatibleAvailable(final AbstractGraphicsDevice device)

Returns true if a ES3 ≥ 3.1 compatible profile is available, i.e. either a ≥ 4.5 context or a ≥ 3.1 context supporting GL_ARB_ES3_1_compatibility, otherwise false.

public final boolean
isGLES32Compatible()

Return true if this context is an ES3 context ≥ 3.2 or implements the extension GL_ARB_ES3_2_compatibility, otherwise false.

public static final boolean
isGLES32CompatibleAvailable(final AbstractGraphicsDevice device)

Returns true if a ES3 ≥ 3.2 compatible profile is available, i.e. either a ≥ 4.5 context or a ≥ 3.1 context supporting GL_ARB_ES3_2_compatibility, otherwise false.

public static boolean
isGLES3Available(final AbstractGraphicsDevice device, final boolean[] isHardware)

public final boolean
isGLES3Compatible()

Return true if this context is an ES3 context or implements the extension GL_ARB_ES3_compatibility, otherwise false.

public static final boolean
isGLES3CompatibleAvailable(final AbstractGraphicsDevice device)

Returns true if a ES3 compatible profile is available, i.e. either a ≥ 4.3 context or a ≥ 3.1 context supporting GL_ARB_ES3_compatibility, otherwise false.

public final boolean
public final boolean
public abstract boolean

Returns:

true if using a read-drawable is supported with your driver/OS, otherwise false.
isGLReadDrawableAvailable
()

Query whether using a distinguished read-drawable is supported.

protected static boolean

Returns:

true if the requested GL version is available regardless of a software or hardware rasterizer, otherwise false.
isGLVersionAvailable
(final AbstractGraphicsDevice
the device to request whether the profile is available for
device
,
final int
Key Value either 1, 2, 3 or 4
reqMajor
,
final int reqProfile, final boolean[]
return value of one boolean, whether the profile is a hardware rasterizer or not
isHardware
)

public final boolean

Returns:

true if impl. is a hardware rasterizer, otherwise false.
isHardwareRasterizer
()

public static final int

Returns:

1 if using a hardware rasterizer, 0 if using a software rasterizer and -1 if not determined yet.
isHardwareRasterizer
(final AbstractGraphicsDevice device, final GLProfile glp)

public boolean
isNPOTTextureAvailable()

Note

The GL impl.

public final boolean
isShared()

Returns true if this GLContext is shared, otherwise false.

public boolean
public static final boolean
isValidGLVersion(final int ctxProfile, final int major, final int minor)

Returns true, if the major.minor is not inferior to the lowest valid version and does not exceed the highest known major number by more than one.

public final boolean
joinSwapGroup(final int group)

protected boolean
joinSwapGroupImpl(final int group)

public abstract int

Returns:

makeCurrent
()

Makes this GLContext current on the calling thread.

public static final String
makeCurrentResultToString(final int res)

Returns a String representation of the makeCurrent() result.

protected static Integer
mapAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int profile, final int resMajor, final int resMinor, int resCtp)

public final boolean
queryMaxSwapGroups(final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset)

protected boolean
queryMaxSwapGroupsImpl(final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset)

public abstract void
release()

Releases control of this GLContext from the current thread.

public abstract void
protected void
resetStates(final boolean
true if called for class initialization, otherwise false (re-init or destruction).
isInit
)

protected static void
setAvailableGLVersionsSet(final AbstractGraphicsDevice device, final boolean set)

public abstract void
setContextCreationFlags(int
Additional context creation flags, supported: GLContext#CTX_OPTION_DEBUG. Unsupported flags are masked out. Only affects this context state if not created yet via makeCurrent().
flags
)

protected static void
setCurrent(final GLContext cur)

Sets the thread-local variable returned by getCurrent and has no other side-effects.

protected void
public abstract GL

Returns:

the set GL pipeline or null if not successful
setGL
(GL gl)

Sets the GL pipeline object for this GLContext.

public abstract void
setGLDebugSynchronous(boolean synchronous)

Enables or disables the synchronous debug behavior via glEnable/glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS), if extension is GLExtensions#ARB_debug_output.

public abstract GLDrawable

Returns:

The previous read/write drawable if operation succeeds
setGLDrawable
(GLDrawable
The read/write drawable for framebuffer operations, maybe null to remove association.
readWrite
,
boolean
Only change the write-drawable, if setWriteOnly is true and if the read-drawable differs from the write-drawable. Otherwise set both drawables, read and write.
setWriteOnly
)

Sets the read/write drawable for framebuffer operations, i.e. reassociation of the context's drawable.

public abstract GLDrawable

Returns:

the previous read-drawable
setGLReadDrawable
(GLDrawable
the read-drawable for read framebuffer operations. If null is passed, the default write drawable will be set.
read
)

Set the read-Drawable for read framebuffer operations.

public boolean

Returns:

true if the operation was successful, otherwise false
setSwapInterval
(final int
see above
interval
)

Set the swap interval of the current context and attached onscreen GLDrawable.

protected boolean
setSwapIntervalImpl(final int interval)

protected static void
shutdown()

clears the device/context mappings as well as the GL/GLX proc address tables.

protected static String
toHexString(final int hex)

protected static String
toHexString(final long hex)

public String
toString()

Overrides java.lang.Object.toString.

Classname, GL, GLDrawable
public final void
private static void
validateProfileBits(final int bits, final String argName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait