|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Abstraction for an OpenGL rendering context. More...
Public Member Functions | |
| final boolean | isShared () |
| Returns true if this GLContext is shared, otherwise false. More... | |
| final GLContext | getSharedMaster () |
Returns the shared master GLContext of this GLContext if shared, otherwise return null. More... | |
| final List< GLContext > | getCreatedShares () |
| Returns a new list of created GLContext shared with this GLContext. More... | |
| final List< GLContext > | getDestroyedShares () |
| Returns a new list of destroyed GLContext shared with this GLContext. More... | |
| final GLRendererQuirks | getRendererQuirks () |
Returns the instance of GLRendererQuirks, allowing one to determine workarounds. More... | |
| final boolean | hasRendererQuirk (final int quirk) throws IllegalArgumentException |
Returns true if the quirk exist in getRendererQuirks(), otherwise false. More... | |
| abstract GLDrawable | setGLDrawable (GLDrawable readWrite, boolean setWriteOnly) |
| Sets the read/write drawable for framebuffer operations, i.e. More... | |
| abstract GLDrawable | getGLDrawable () |
| Returns the write-drawable this context uses for framebuffer operations. More... | |
| abstract boolean | isGLReadDrawableAvailable () |
| Query whether using a distinguished read-drawable is supported. More... | |
| abstract GLDrawable | setGLReadDrawable (GLDrawable read) |
| Set the read-Drawable for read framebuffer operations. More... | |
| abstract GLDrawable | getGLReadDrawable () |
| Returns the read-Drawable this context uses for read framebuffer operations. More... | |
| abstract int | makeCurrent () throws GLException |
| Makes this GLContext current on the calling thread. More... | |
| abstract void | release () throws GLException |
| Releases control of this GLContext from the current thread. More... | |
| abstract void | copy (GLContext source, int mask) throws GLException |
| Copies selected groups of OpenGL state variables from the supplied source context into this one. More... | |
| final boolean | isCurrent () |
| final void | validateCurrent () throws GLException |
| abstract void | destroy () |
| Destroys this OpenGL context and frees its associated resources. More... | |
| abstract GL | getRootGL () |
Returns the implementing root GL instance of this GLContext's GL object, considering a wrapped pipelined hierarchy, see GLBase#getDownstreamGL(). More... | |
| abstract GL | getGL () |
| Returns the GL pipeline object for this GLContext. More... | |
| abstract GL | setGL (GL gl) |
| Sets the GL pipeline object for this GLContext. More... | |
| final long | getHandle () |
| Returns the underlying native OpenGL context handle. More... | |
| final boolean | isCreated () |
| Indicates whether the underlying native OpenGL context has been created. More... | |
| final Object | getAttachedObject (final String name) |
| Returns the attached user object for the given name to this GLContext. More... | |
| final Object | attachObject (final String name, final Object obj) |
| Sets the attached user object for the given name to this GLContext. More... | |
| final Object | detachObject (final String name) |
| String | toString () |
| Classname, GL, GLDrawable. More... | |
| final StringBuilder | append (final StringBuilder sb) |
| abstract boolean | isFunctionAvailable (String 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. More... | |
| abstract boolean | isExtensionAvailable (String 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. More... | |
| abstract int | getPlatformExtensionCount () |
| Returns the number of platform extensions. More... | |
| 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. More... | |
| abstract int | getGLExtensionCount () |
| Returns the number of OpenGL extensions. More... | |
| abstract String | getGLExtensionsString () |
| Returns a non-null (but possibly empty) string containing the space-separated list of available extensions. More... | |
| abstract int | getContextCreationFlags () |
| abstract void | setContextCreationFlags (int flags) |
| final String | getGLVersion () |
| Returns a valid OpenGL version string, ie More... | |
| final VersionNumber | getGLVersionNumber () |
| Returns this context OpenGL version. More... | |
| final VersionNumberString | getGLVendorVersionNumber () |
| Returns the vendor's version, i.e. More... | |
| final boolean | isGLCompatibilityProfile () |
| final boolean | isGLCoreProfile () |
| final boolean | isGLESProfile () |
| final boolean | isGLForwardCompatible () |
| final boolean | isGLDebugEnabled () |
| final boolean | isCreatedWithARBMethod () |
| final String | getGLSLVersionString () |
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. More... | |
| final boolean | isGLES2Compatible () |
| final boolean | isGLES3Compatible () |
Return true if this context is an ES3 context or implements the extension GL_ARB_ES3_compatibility, otherwise false. More... | |
| 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. More... | |
| 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. More... | |
| final boolean | isHardwareRasterizer () |
| final boolean | hasGLSL () |
| final boolean | hasBasicFBOSupport () |
Returns true if basic FBO support is available, otherwise false. More... | |
| final boolean | hasFullFBOSupport () |
Returns true if full FBO support is available, otherwise false. More... | |
| final boolean | hasFP32CompatAPI () |
Returns true if OES_single_precision, fp32, fixed function point (FFP) compatibility entry points available, otherwise false. More... | |
| final int | getMaxRenderbufferSamples () |
Returns the maximum number of FBO RENDERBUFFER samples if full FBO is supported, otherwise false. More... | |
| boolean | isNPOTTextureAvailable () |
| Note: The GL impl. More... | |
| boolean | isTextureFormatBGRA8888Available () |
| final boolean | isGL4bc () |
| Indicates whether this GLContext is capable of GL4bc. More... | |
| final boolean | isGL4 () |
| Indicates whether this GLContext is capable of GL4. More... | |
| final boolean | isGL4core () |
| Indicates whether this GLContext uses a GL4 core profile. More... | |
| final boolean | isGL3bc () |
| Indicates whether this GLContext is capable of GL3bc. More... | |
| final boolean | isGL3 () |
| Indicates whether this GLContext is capable of GL3. More... | |
| final boolean | isGL3core () |
| Indicates whether this GLContext uses a GL3 core profile. More... | |
| final boolean | isGLcore () |
| Indicates whether this GLContext uses a GL core profile. More... | |
| final boolean | isCPUDataSourcingAvail () |
| Indicates whether this GLContext allows CPU data sourcing (indices, vertices ..) as opposed to using a GPU buffer source (VBO), e.g. More... | |
| 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. More... | |
| 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. More... | |
| final boolean | isGL2 () |
| Indicates whether this GLContext is capable of GL2. More... | |
| final boolean | isGL2GL3 () |
| Indicates whether this GLContext is capable of GL2GL3. More... | |
| final boolean | isGLES1 () |
| Indicates whether this GLContext is capable of GLES1. More... | |
| final boolean | isGLES2 () |
| Indicates whether this GLContext is capable of GLES2. More... | |
| final boolean | isGLES3 () |
| Indicates whether this GLContext is capable of GLES3. More... | |
| final boolean | isGLES () |
| Indicates whether this GLContext is capable of GLES. More... | |
| final boolean | isGL2ES1 () |
| Indicates whether this GLContext is capable of GL2ES1. More... | |
| final boolean | isGL2ES2 () |
| Indicates whether this GLContext is capable of GL2ES2. More... | |
| final boolean | isGL2ES3 () |
| Indicates whether this GLContext is capable of GL2ES3. More... | |
| final boolean | isGL3ES3 () |
| Indicates whether this GLContext is capable of GL3ES3. More... | |
| final boolean | isGL4ES3 () |
| Returns true if this profile is capable of GL4ES3, i.e. More... | |
| boolean | setSwapInterval (final int interval) throws GLException |
Set the swap interval of the current context and attached onscreen GLDrawable. More... | |
| int | getSwapInterval () |
| Return the current swap interval. More... | |
| final boolean | queryMaxSwapGroups (final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset) |
| final boolean | joinSwapGroup (final int group) |
| int | getSwapGroup () |
| final boolean | bindSwapBarrier (final int group, final int barrier) |
| abstract int | getBoundFramebuffer (int target) |
Return the framebuffer name bound to this context, see GL#glBindFramebuffer(int, int). More... | |
| abstract int | getDefaultDrawFramebuffer () |
| Return the default draw framebuffer name. More... | |
| abstract int | getDefaultReadFramebuffer () |
| Return the default read framebuffer name. More... | |
| abstract int | getDefaultDrawBuffer () |
Returns the default color buffer within the current bound getDefaultReadFramebuffer(), i.e. More... | |
| abstract int | getDefaultReadBuffer () |
Returns the default color buffer within the current bound getDefaultReadFramebuffer(), i.e. More... | |
| abstract int | getDefaultPixelDataType () |
| Get the default pixel data type, as required by e.g. More... | |
| abstract int | getDefaultPixelDataFormat () |
| Get the default pixel data format, as required by e.g. More... | |
| abstract DynamicLibraryBundle | getDynamicLibraryBundle () |
| Returns the DynamicLibraryBundle, matching context. More... | |
| abstract String | getGLDebugMessageExtension () |
| abstract boolean | isGLDebugSynchronous () |
| 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. More... | |
| abstract boolean | isGLDebugMessageEnabled () |
| abstract void | enableGLDebugMessage (boolean enable) throws GLException |
Enables or disables the GLDebugOutput feature of extension GLExtensions#ARB_debug_output or GLExtensions#AMD_debug_output, if available. More... | |
| abstract void | addGLDebugListener (GLDebugListener listener) |
Add GLDebugListener. More... | |
| abstract void | removeGLDebugListener (GLDebugListener listener) |
Remove GLDebugListener. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions | |
| static GL | getCurrentGL () throws GLException |
| Returns the GL object bound to this thread current context. More... | |
| static GLContext | getCurrent () |
| Returns this thread current context. More... | |
| static final String | makeCurrentResultToString (final int res) |
Returns a String representation of the makeCurrent() result. More... | |
| static final int | getMaxMajor (final int ctxProfile) |
| static final int | getMaxMinor (final int ctxProfile, final int major) |
| 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. More... | |
| static final boolean | clipGLVersion (final int ctxProfile, final int major[], final int minor[]) |
| Clip the given GL version to the maximum known valid version if exceeding. More... | |
| 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. More... | |
| static final boolean | isFBOAvailable (final AbstractGraphicsDevice device, final GLProfile glp) |
| Returns true if it is possible to create an framebuffer object (FBO). More... | |
| static final int | isHardwareRasterizer (final AbstractGraphicsDevice device, final GLProfile glp) |
| static boolean | isGLES1Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGLES2Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGLES3Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static final boolean | isGLES3CompatibleAvailable (final AbstractGraphicsDevice device) |
| Returns true if a ES3 compatible profile is available, i.e. More... | |
| static final boolean | isGLES31CompatibleAvailable (final AbstractGraphicsDevice device) |
| Returns true if a ES3 ≥ 3.1 compatible profile is available, i.e. More... | |
| static final boolean | isGLES32CompatibleAvailable (final AbstractGraphicsDevice device) |
| Returns true if a ES3 ≥ 3.2 compatible profile is available, i.e. More... | |
| static boolean | isGL4bcAvailable (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGL4Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGL3bcAvailable (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGL3Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
| static boolean | isGL2Available (final AbstractGraphicsDevice device, final boolean isHardware[]) |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("GLContext") |
| static final boolean | TRACE_SWITCH = Debug.isPropertyDefined("jogl.debug.GLContext.TraceSwitch", true) |
| static final boolean | DEBUG_TRACE_SWITCH = DEBUG || TRACE_SWITCH |
| static final boolean | PROFILE_ALIASING = !Debug.isPropertyDefined("jogl.debug.GLContext.NoProfileAliasing", true) |
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: More... | |
| static final boolean | DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true) |
| Reflects property jogl.debug.DebugGL. More... | |
| static final boolean | TRACE_GL = Debug.isPropertyDefined("jogl.debug.TraceGL", true) |
| Reflects property jogl.debug.TraceGL. More... | |
| static final int | CONTEXT_NOT_CURRENT = 0 |
Indicates that the context was not made current during the last call to makeCurrent, value {@value}. More... | |
| static final int | CONTEXT_CURRENT = 1 |
Indicates that the context was made current during the last call to makeCurrent, value {@value}. More... | |
| static final int | CONTEXT_CURRENT_NEW = 2 |
Indicates that a newly-created context was made current during the last call to makeCurrent, value {@value}. More... | |
| static final VersionNumber | Version1_0 = new VersionNumber(1, 0, 0) |
| Version 1.00, i.e. More... | |
| static final VersionNumber | Version1_10 = new VersionNumber(1, 10, 0) |
| Version 1.10, i.e. More... | |
| static final VersionNumber | Version1_20 = new VersionNumber(1, 20, 0) |
| Version 1.20, i.e. More... | |
| static final VersionNumber | Version1_30 = new VersionNumber(1, 30, 0) |
| Version 1.30, i.e. More... | |
| static final VersionNumber | Version1_40 = new VersionNumber(1, 40, 0) |
| Version 1.40, i.e. More... | |
| static final VersionNumber | Version1_50 = new VersionNumber(1, 50, 0) |
| Version 1.50, i.e. More... | |
| static final VersionNumber | Version1_1 = new VersionNumber(1, 1, 0) |
| Version 1.1, i.e. More... | |
| static final VersionNumber | Version1_2 = new VersionNumber(1, 2, 0) |
| Version 1.2, i.e. More... | |
| static final VersionNumber | Version1_4 = new VersionNumber(1, 4, 0) |
| Version 1.4, i.e. More... | |
| static final VersionNumber | Version1_5 = new VersionNumber(1, 5, 0) |
| Version 1.5, i.e. More... | |
| static final VersionNumber | Version3_0 = new VersionNumber(3, 0, 0) |
| Version 3.0. More... | |
| static final VersionNumber | Version3_1 = new VersionNumber(3, 1, 0) |
| Version 3.1. More... | |
| static final VersionNumber | Version3_2 = new VersionNumber(3, 2, 0) |
| Version 3.2. More... | |
| static final VersionNumber | Version4_3 = new VersionNumber(4, 3, 0) |
| Version 4.3. More... | |
| static final int | CTX_OPTION_DEBUG = 1 << 5 |
ARB_create_context related: flag debug. More... | |
| static final int | GL_VERSIONS [][] |
| static final int | ES_VERSIONS [][] |
Protected Member Functions | |
| GLContext () | |
| void | resetStates (final boolean isInit) |
| boolean | setSwapIntervalImpl (final int interval) |
| void | setDefaultSwapInterval () |
| boolean | queryMaxSwapGroupsImpl (final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset) |
| boolean | joinSwapGroupImpl (final int group) |
| boolean | bindSwapBarrierImpl (final int group, final int barrier) |
Static Protected Member Functions | |
| static void | setCurrent (final GLContext cur) |
Sets the thread-local variable returned by getCurrent and has no other side-effects. More... | |
| static final VersionNumber | getStaticGLSLVersionNumber (final int glMajorVersion, final int glMinorVersion, final int ctxOptions) |
| static int | composeBits (final int a8, final int b8, final int c16) |
| static VersionNumber | decomposeBits (final int bits32, final int[] ctp) |
| static int | getCTPFromBits (final int bits32) |
| static void | validateProfileBits (final int bits, final String argName) |
| static void | shutdown () |
| clears the device/context mappings as well as the GL/GLX proc address tables. More... | |
| static boolean | getAvailableGLVersionsSet (final AbstractGraphicsDevice device) |
| static void | setAvailableGLVersionsSet (final AbstractGraphicsDevice device, final boolean set) |
| 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. More... | |
| static StringBuilder | dumpAvailableGLVersions (StringBuilder sb) |
| static Integer | getAvailableGLVersion (final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile) |
| static boolean | getAvailableGLVersion (final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile, final int[] major, final int minor[], final int ctp[]) |
| static String | getGLProfile (final int major, final int minor, final int ctp) throws GLException |
| returns the highest GLProfile string regarding the implementation version and context profile bits. More... | |
| 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. More... | |
| static final int | getAvailableContextProperties (final AbstractGraphicsDevice device, final GLProfile glp) |
| static GLProfile | getAvailableGLProfile (final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile) throws GLException |
| static String | getAvailableGLVersionAsString (final AbstractGraphicsDevice device, final int major, final int profile) |
| static boolean | isGLVersionAvailable (final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile, final boolean isHardware[]) |
| static StringBuilder | getGLProfile (final StringBuilder sb, final int ctp) |
| static StringBuilder | getGLVersion (final StringBuilder sb, final VersionNumber version, final int ctp, final String gl_version) |
| static StringBuilder | getGLVersion (final StringBuilder sb, final int major, final int minor, final int ctp, final String gl_version) |
| static String | getGLVersion (final int major, final int minor, final int ctp, final String gl_version) |
| static String | toHexString (final int hex) |
| static String | toHexString (final long hex) |
| static String | getThreadName () |
Protected Attributes | |
| final RecursiveLock | lock = LockFactory.createRecursiveLock() |
| volatile long | contextHandle |
| The underlying native OpenGL context. More... | |
| VersionNumber | ctxVersion |
| int | ctxOptions |
| String | ctxVersionString |
| VersionNumberString | ctxVendorVersion |
| VersionNumber | ctxGLSLVersion |
| GLRendererQuirks | glRendererQuirks |
| boolean | drawableRetargeted |
Did the drawable association changed ? see GLRendererQuirks#NoSetSwapIntervalPostRetarget. More... | |
| int | currentSwapGroup = -1 |
Static Protected Attributes | |
| static final VersionNumber | Version8_0 = new VersionNumber(8, 0, 0) |
| static final int | CTX_IMPL_FULL_MASK = 0x0000FFFF |
| Context option bits, full bit mask covering 16 bits [0..15], i.e. More... | |
| static final int | CTX_IMPL_CACHE_MASK = 0x000003FF |
| Context option bits, cached bit mask covering 10 bits [0..9], i.e. More... | |
| static final int | CTX_IS_ARB_CREATED = 1 << 0 |
ARB_create_context related: created via ARB_create_context. More... | |
| static final int | CTX_PROFILE_COMPAT = 1 << 1 |
ARB_create_context related: desktop compatibility profile. More... | |
| static final int | CTX_PROFILE_CORE = 1 << 2 |
ARB_create_context related: desktop core profile. More... | |
| static final int | CTX_PROFILE_ES = 1 << 3 |
ARB_create_context related: ES profile. More... | |
| static final int | CTX_OPTION_FORWARD = 1 << 4 |
ARB_create_context related: flag forward compatible. More... | |
| static final int | CTX_IMPL_ACCEL_SOFT = 1 << 6 |
| Context uses software rasterizer, otherwise hardware rasterizer. More... | |
| static final int | CTX_IMPL_ES2_COMPAT = 1 << 10 |
GL_ARB_ES2_compatibility implementation related: Context is compatible w/ ES2. More... | |
| static final int | CTX_IMPL_ES3_COMPAT = 1 << 11 |
GL_ARB_ES3_compatibility implementation related: Context is compatible w/ ES3. More... | |
| static final int | CTX_IMPL_ES31_COMPAT = 1 << 12 |
GL_ARB_ES3_1_compatibility implementation related: Context is compatible w/ ES 3.1. More... | |
| static final int | CTX_IMPL_ES32_COMPAT = 1 << 13 |
GL_ARB_ES3_2_compatibility implementation related: Context is compatible w/ ES 3.2. More... | |
| static final int | CTX_IMPL_FBO = 1 << 14 |
Context supports basic FBO, details see hasBasicFBOSupport(). More... | |
| static final int | CTX_IMPL_FP32_COMPAT_API = 1 << 15 |
Context supports OES_single_precision, fp32, fixed function point (FFP) compatibility entry points, see hasFP32CompatAPI(). More... | |
| static final IdentityHashMap< String, Integer > | deviceVersionAvailable = new IdentityHashMap<String, Integer>() |
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.
Definition at line 74 of file GLContext.java.
|
protected |
|
abstract |
| final StringBuilder com.jogamp.opengl.GLContext.append | ( | final StringBuilder | sb | ) |
Definition at line 640 of file GLContext.java.
| final Object com.jogamp.opengl.GLContext.attachObject | ( | final String | name, |
| final Object | obj | ||
| ) |
Sets the attached user object for the given name to this GLContext.
Returns the previously set object or null.
Definition at line 619 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.bindSwapBarrier | ( | final int | group, |
| final int | barrier | ||
| ) |
Definition at line 1322 of file GLContext.java.
|
protected |
|
static |
Clip the given GL version to the maximum known valid version if exceeding.
Definition at line 1597 of file GLContext.java.
|
staticprotected |
|
abstract |
Copies selected groups of OpenGL state variables from the supplied source context into this one.
The mask parameter indicates which groups of state variables are to be copied. mask contains the bitwise OR of the same symbolic names that are passed to the GL command glPushAttrib. The single symbolic constant GL_ALL_ATTRIB_BITS can be used to copy the maximum possible portion of rendering state.
Not all values for GL state can be copied. For example, pixel pack and unpack state, render mode state, and select and feedback state are not copied. The state that can be copied is exactly the state that is manipulated by the GL command glPushAttrib.
On most platforms, this context may not be current to any thread, including the calling thread, when this method is called. Some platforms have additional requirements such as whether this context or the source context must occasionally be made current in order for the results of the copy to be seen; these requirements are beyond the scope of this specification.
| source | the source OpenGL context from which to copy state |
| mask | a mask of symbolic names indicating which groups of state to copy |
| GLException | if an OpenGL-related error occurred |
|
staticprotected |
|
static |
Decrement the given GL version by one and return true if still valid, otherwise false.
If the given version exceeds the maximum known valid version, it is clipped and true is returned.
| ctxProfile | |
| major | |
| minor |
Definition at line 1636 of file GLContext.java.
|
abstract |
Destroys this OpenGL context and frees its associated resources.
The context may be current w/o recursion when calling destroy(), in which case this method destroys the context and releases the lock.
| final Object com.jogamp.opengl.GLContext.detachObject | ( | final String | name | ) |
|
staticprotected |
Definition at line 1738 of file GLContext.java.
|
abstract |
Enables or disables the GLDebugOutput feature of extension GLExtensions#ARB_debug_output or GLExtensions#AMD_debug_output, if available.
To enable the GLDebugOutput feature enableGLDebugMessage(true) or setContextCreationFlags(GLContext#CTX_OPTION_DEBUG) shall be called before context creation via makeCurrent()!
In case GLAutoDrawable are being used, glAutoDrawable.setContextCreationFlags(GLContext#CTX_OPTION_DEBUG) shall be issued before context creation via makeCurrent()!
After context creation, the GLDebugOutput feature may be enabled or disabled at any time using this method.
| enable | If true enables, otherwise disables the GLDebugOutput feature. |
| GLException | if this context is not current or GLDebugOutput registration failed (enable) |
| final Object com.jogamp.opengl.GLContext.getAttachedObject | ( | final String | name | ) |
Returns the attached user object for the given name to this GLContext.
Definition at line 611 of file GLContext.java.
|
staticprotected |
| device | the device the context profile is being requested for |
| GLProfile | the GLProfile the context profile is being requested for |
0 Definition at line 1858 of file GLContext.java.
|
staticprotected |
| device | the device the profile is being requested |
| major | Key Value either 1, 2, 3 or 4 |
| profile | Key Value either CTX_PROFILE_COMPAT, CTX_PROFILE_CORE or CTX_PROFILE_ES |
Definition at line 1877 of file GLContext.java.
|
staticprotected |
| device | the device to request whether the profile is available for |
| reqMajor | Key Value either 1, 2, 3 or 4 |
| reqProfile | Key Value either CTX_PROFILE_COMPAT, CTX_PROFILE_CORE or CTX_PROFILE_ES |
, otherwise null Definition at line 1771 of file GLContext.java.
|
staticprotected |
| reqMajor | Key Value either 1, 2, 3 or 4 |
| reqProfile | Key Value either CTX_PROFILE_COMPAT, CTX_PROFILE_CORE or CTX_PROFILE_ES |
| major | if not null, returns the used major version |
| minor | if not null, returns the used minor version |
| ctp | if not null, returns the used context profile |
Definition at line 1787 of file GLContext.java.
|
staticprotected |
| device | the device the profile is being requested |
| major | Key Value either 1, 2, 3 or 4 |
| profile | Key Value either CTX_PROFILE_COMPAT, CTX_PROFILE_CORE or CTX_PROFILE_ES |
Definition at line 1905 of file GLContext.java.
|
staticprotected |
|
abstract |
Return the framebuffer name bound to this context, see GL#glBindFramebuffer(int, int).
Method is only thread-safe while context is made current.
|
abstract |
GLContext#CTX_OPTION_DEBUG. | final List< GLContext > com.jogamp.opengl.GLContext.getCreatedShares | ( | ) |
Returns a new list of created GLContext shared with this GLContext.
Definition at line 277 of file GLContext.java.
|
staticprotected |
Definition at line 1673 of file GLContext.java.
|
static |
Returns this thread current context.
If no context is current, returns null.
Definition at line 515 of file GLContext.java.
|
static |
Returns the GL object bound to this thread current context.
If no context is current, throw an GLException
| GLException | if no context is current |
Definition at line 500 of file GLContext.java.
|
abstract |
Returns the default color buffer within the current bound getDefaultReadFramebuffer(), i.e.
GL_READ_FRAMEBUFFER​, which will be used as the target (output) for (fragment shader) draw commands, settable via GL2ES2#glDrawBuffers(int, int[], int) or GL2#glDrawBuffer(int).
For offscreen framebuffer objects this is GL#GL_COLOR_ATTACHMENT0, otherwise this is GL#GL_FRONT for non-ES profile and single buffer configurations and GL#GL_BACK for double buffer configurations or ES profiles.
Note-1: Neither ES1 nor ES2 supports selecting the draw buffer at all and GL#GL_BACK is the default.
Note-2: ES3 only supports GL#GL_BACK, GL#GL_NONE or GL#GL_COLOR_ATTACHMENT0+i via GL2ES2#glDrawBuffers(int, int[], int).
Method is only thread-safe while context is made current.
|
abstract |
Return the default draw framebuffer name.
May differ from it's default zero in case an framebuffer object (com.jogamp.opengl.FBObject) based drawable is being used.
Method is only thread-safe while context is made current.
|
abstract |
Get the default pixel data format, as required by e.g.
GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer).
Method is only thread-safe while context is made current.
|
abstract |
Get the default pixel data type, as required by e.g.
GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer).
Method is only thread-safe while context is made current.
|
abstract |
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 non-ES profile and single buffer configurations and GL#GL_BACK for double buffer configurations or ES profiles.
Note-1: Neither ES1 nor ES2 supports selecting the read buffer via glReadBuffer and GL#GL_BACK is the default.
Note-2: ES3 only supports GL#GL_BACK, GL#GL_NONE or GL#GL_COLOR_ATTACHMENT0+i
Note-3: See swapBuffersBeforeRead for read-pixels and swap-buffers implications.
Method is only thread-safe while context is made current.
|
abstract |
Return the default read framebuffer name.
May differ from it's default zero in case an framebuffer object (com.jogamp.opengl.FBObject) based drawable is being used.
Method is only thread-safe while context is made current.
|
abstract |
If this GLContext does not implement a default VAO, see hasNoDefaultVAO(), an own default VAO will be created and bound at context creation.
If this GLContext does implement a default VAO, i.e. hasNoDefaultVAO() returns false, this method returns 0.
Otherwise this method returns the VAO object name representing this GLContext's own default VAO.
| final List< GLContext > com.jogamp.opengl.GLContext.getDestroyedShares | ( | ) |
Returns a new list of destroyed GLContext shared with this GLContext.
Definition at line 282 of file GLContext.java.
|
staticprotected |
Returns a unique String object using String#intern() for the given arguments, which object reference itself can be used as a key.
Definition at line 1733 of file GLContext.java.
|
abstract |
Returns the DynamicLibraryBundle, matching context.
|
abstract |
|
abstract |
GLExtensions#ARB_debug_output or GLExtensions#AMD_debug_output. If unavailable or called before initialized via makeCurrent(), null is returned.
|
abstract |
Returns the write-drawable this context uses for framebuffer operations.
If the read-drawable has not been changed manually via setGLReadDrawable(GLDrawable), it equals to the write-drawable (default).
Method is only thread-safe while context is made current.
|
abstract |
Returns the number of OpenGL extensions.
|
abstract |
Returns a non-null (but possibly empty) string containing the space-separated list of available extensions.
Can only be called while this context is current. This is equivalent to glGetString(GL_EXTENSIONS)
|
staticprotected |
returns the highest GLProfile string regarding the implementation version and context profile bits.
| GLException | if version and context profile bits could not be mapped to a GLProfile |
Definition at line 1813 of file GLContext.java.
|
staticprotected |
Definition at line 2048 of file GLContext.java.
|
abstract |
Returns the read-Drawable this context uses for read framebuffer operations.
If the read-drawable has not been changed manually via setGLReadDrawable(GLDrawable), it equals to the write-drawable (default).
Method is only thread-safe while context is made current.
| final String com.jogamp.opengl.GLContext.getGLSLVersionString | ( | ) |
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.
The context must have been current once, otherwise the zero version instance is returned.
Examples w/ major.minor:
1.00 (ES 2.0), 3.00 (ES 3.0)
1.10 (GL 2.0), 1.20 (GL 2.1), 1.50 (GL 3.2),
3.30 (GL 3.3), 4.00 (GL 4.0), 4.10 (GL 4.1), 4.20 (GL 4.2)
Matching could also refer to the maximum GLSL version usable by this context since normal GL implementations are capable of using a lower GLSL version as well. The latter is not true on OSX w/ a GL3 context.
zero version instance is returned./** Returns the GLSL version string as to be used in a shader program, including a terminating newline '
', i.e. for desktop
#version 110
..
#version 150 core
#version 330 compatibility
...
And for ES:
#version 100
#version 300 es
..
If context has not been made current yet, a string of zero length is returned.
Definition at line 848 of file GLContext.java.
| final VersionNumberString com.jogamp.opengl.GLContext.getGLVendorVersionNumber | ( | ) |
Returns the vendor's version, i.e.
version number at the end of GL_VERSION not being the GL version.
In case no such version exists within GL_VERSION, the zero version instance is returned.
The vendor's version is usually the vendor's OpenGL driver version.
Definition at line 788 of file GLContext.java.
| final String com.jogamp.opengl.GLContext.getGLVersion | ( | ) |
Returns a valid OpenGL version string, ie
major.minor ([option]?[options,]*) - gl-version
<br<blockquote>
ES profile ES profile Compatibility profile Compatibility profile including fixed function pipeline and deprecated functionality Core profile Core profile forward Forward profile excluding deprecated functionality arb refers to an ARB_create_context created context debug refers to a debug context ES2 compatible refers to an ES2 compatible implementation software refers to a software implementation of the rasterizer hardware refers to a hardware implementation of the rasterizer e.g.:
| row 2, cell 1 | row 2, cell 2 |
| ES2 | 2.0 (ES profile, ES2 compatible, hardware) - 2.0 ES Profile | |
| ATI | GL2 | 3.0 (Compatibility profile, arb, hardware) - 3.2.9704 Compatibility Profile Context |
| ATI | GL3 | 3.3 (Core profile, any, new, hardware) - 1.4 (3.2.9704 Compatibility Profile Context) |
| ATI | GL3bc | 3.3 (Compatibility profile, arb, hardware) - 1.4 (3.2.9704 Compatibility Profile Context) |
| NV | GL2 | 3.0 (Compatibility profile, arb, hardware) - 3.0.0 NVIDIA 195.36.07.03 |
| NV | GL3 | 3.3 (Core profile, arb, hardware) - 3.3.0 NVIDIA 195.36.07.03 |
| NV | GL3bc | 3.3 (Compatibility profile, arb, hardware) - 3.3.0 NVIDIA 195.36.07.03 |
| NV | GL2 | 3.0 (Compatibility profile, arb, ES2 compatible, hardware) - 3.0.0 NVIDIA 290.10 |
Definition at line 769 of file GLContext.java.
|
staticprotected |
|
staticprotected |
|
staticprotected |
| final VersionNumber com.jogamp.opengl.GLContext.getGLVersionNumber | ( | ) |
Returns this context OpenGL version.
Definition at line 777 of file GLContext.java.
| final long com.jogamp.opengl.GLContext.getHandle | ( | ) |
Returns the underlying native OpenGL context handle.
Definition at line 599 of file GLContext.java.
|
static |
Definition at line 1536 of file GLContext.java.
|
static |
Definition at line 1540 of file GLContext.java.
| final int com.jogamp.opengl.GLContext.getMaxRenderbufferSamples | ( | ) |
Returns the maximum number of FBO RENDERBUFFER samples if full FBO is supported, otherwise false.
Definition at line 1005 of file GLContext.java.
|
abstract |
Returns the number of platform extensions.
|
abstract |
Returns a non-null (but possibly empty) string containing the space-separated list of available platform-dependent (e.g., WGL, GLX) extensions.
Can only be called while this context is current.
| final GLRendererQuirks com.jogamp.opengl.GLContext.getRendererQuirks | ( | ) |
Returns the instance of GLRendererQuirks, allowing one to determine workarounds.
GLRendererQuirks if context was made current once, otherwise null. Definition at line 290 of file GLContext.java.
|
staticprotected |
Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request.
Definition at line 1833 of file GLContext.java.
|
abstract |
Returns the implementing root GL instance of this GLContext's GL object, considering a wrapped pipelined hierarchy, see GLBase#getDownstreamGL().
| GLException | if the root instance is not a GL implementation |
| final GLContext com.jogamp.opengl.GLContext.getSharedMaster | ( | ) |
Returns the shared master GLContext of this GLContext if shared, otherwise return null.
Returns this GLContext, if it is a shared master.
Definition at line 272 of file GLContext.java.
|
staticprotected |
Definition at line 866 of file GLContext.java.
| int com.jogamp.opengl.GLContext.getSwapGroup | ( | ) |
Definition at line 1319 of file GLContext.java.
| int com.jogamp.opengl.GLContext.getSwapInterval | ( | ) |
Return the current swap interval.
If the context has not been made current at all, the default value 0 is returned.
For a valid context w/ an <o>onscreen GLDrawable the default value is 1, otherwise the default value is 0.
Definition at line 1296 of file GLContext.java.
|
staticprotected |
|
abstract |
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.
|
abstract |
Generic entry for GL2GL3#glDebugMessageControl(int, int, int, int, IntBuffer, boolean) and GL2GL3#glDebugMessageEnableAMD(int, int, int, IntBuffer, boolean) of the GLDebugOutput feature.
|
abstract |
Generic entry for GL2GL3#glDebugMessageInsert(int, int, int, int, int, String) and GL2GL3#glDebugMessageInsertAMD(int, int, int, int, String) of the GLDebugOutput feature.
| final boolean com.jogamp.opengl.GLContext.hasBasicFBOSupport | ( | ) |
Returns true if basic FBO support is available, otherwise false.
Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= 3.0 [core, compat] or implements the extensions GL_ARB_ES2_compatibility, GL_ARB_framebuffer_object, GL_EXT_framebuffer_object or GL_OES_framebuffer_object.
Basic FBO support may only include one color attachment and no multisampling, as well as limited internal formats for renderbuffer.
Definition at line 964 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.hasFP32CompatAPI | ( | ) |
Returns true if OES_single_precision, fp32, fixed function point (FFP) compatibility entry points available, otherwise false.
Definition at line 997 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.hasFullFBOSupport | ( | ) |
Returns true if full FBO support is available, otherwise false.
Full FBO is supported if the context is either GL >= 3.0 [ES, core, compat] or implements the extensions ARB_framebuffer_object, or all of EXT_framebuffer_object, EXT_framebuffer_multisample, EXT_framebuffer_blit, GL_EXT_packed_depth_stencil.
Full FBO support includes multiple color attachments and multisampling.
Definition at line 980 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.hasGLSL | ( | ) |
isGLES3(), isGLES2(), isGL3() or isGL2() and major-version > 1. Definition at line 945 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.hasNoDefaultVAO | ( | ) |
Indicates whether this GLContext's native profile does not implement a default vertex array object (VAO), starting w/ OpenGL 3.1 core.
Due to GL 3.1 core spec: E.1. DEPRECATED AND REMOVED FEATURES (p 296), GL 3.2 core spec: E.2. DEPRECATED AND REMOVED FEATURES (p 331) there is no more default VAO buffer 0 bound, hence generating and binding one to avoid INVALID_OPERATION at VertexAttribPointer. More clear is GL 4.3 core spec: 10.4 (p 307).
ES 3.x is not included here.
Due to it's ES 2.0 backward compatibility it still supports the following features:
client side vertex arrays
default vertex array object
Binding a custom VAO with ES 3.0 would cause client side vertex arrays via glVertexPointer
to produce GL_INVALID_OPERATION.
However, they are marked deprecated:
GL ES 3.0 spec F.1. Legacy Features (p 322).
GL ES 3.1 spec F.1. Legacy Features (p 454).
If no default VAO is implemented in the native OpenGL profile, an own default VAO is being used, see getDefaultVAO().
Definition at line 1135 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.hasRendererQuirk | ( | final int | quirk | ) | throws IllegalArgumentException |
Returns true if the quirk exist in getRendererQuirks(), otherwise false.
Convenience method for:
final GLRendererQuirks glrq = ctx.getRendererQuirks(); boolean hasQuirk = null != glrq ? glrq.exist(quirk) : false ;
| quirk | the quirk to be tested, e.g. GLRendererQuirks#NoDoubleBufferedPBuffer. |
| IllegalArgumentException | if the quirk is out of range |
Definition at line 304 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.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).
Includes [GL2ES1, GLES2] == [ GL4bc, GL3bc, GL2, GLES1, GL2ES1, GLES2 ].
See Bug 852 - https://jogamp.org/bugzilla/show_bug.cgi?id=852
Definition at line 1101 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isCreated | ( | ) |
Indicates whether the underlying native OpenGL context has been created.
Definition at line 604 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isCreatedWithARBMethod | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isCurrent | ( | ) |
Definition at line 522 of file GLContext.java.
|
abstract |
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.
See GL#isExtensionAvailable(String) for more details.
| glExtensionName | the name of the OpenGL extension (e.g., "GL_VERTEX_PROGRAM_ARB"). |
|
static |
Returns true if it is possible to create an framebuffer object (FBO).
FBO feature is implemented in OpenGL, hence it is GLProfile dependent.
FBO support is queried as described in hasBasicFBOSupport().
| device | the device to request whether FBO is available for |
| glp | GLProfile to check for FBO capabilities |
Definition at line 1928 of file GLContext.java.
|
abstract |
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.
See GL#isFunctionAvailable(String) for more details.
| glFunctionName | 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). |
| final boolean com.jogamp.opengl.GLContext.isGL2 | ( | ) |
Indicates whether this GLContext is capable of GL2.
Includes [ GL4bc, GL3bc, GL2 ].
Definition at line 1162 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGL2ES1 | ( | ) |
Indicates whether this GLContext is capable of GL2ES1.
Includes [ GL4bc, GL3bc, GL2, GLES1, GL2ES1 ].
Definition at line 1215 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGL2ES2 | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGL2ES3 | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGL2GL3 | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGL3 | ( | ) |
Indicates whether this GLContext is capable of GL3.
Includes [ GL4bc, GL4, GL3bc, GL3 ].
Definition at line 1072 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGL3bc | ( | ) |
Indicates whether this GLContext is capable of GL3bc.
Definition at line 1063 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGL3core | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGL3ES3 | ( | ) |
Indicates whether this GLContext is capable of GL3ES3.
Includes [ GL4bc, GL4, GL3bc, GL3, GLES3 ].
Definition at line 1241 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGL4 | ( | ) |
Indicates whether this GLContext is capable of GL4.
Definition at line 1046 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGL4bc | ( | ) |
Indicates whether this GLContext is capable of GL4bc.
Includes [ GL4bc ].
Definition at line 1037 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGL4core | ( | ) |
Indicates whether this GLContext uses a GL4 core profile.
Includes [ GL4 ].
Definition at line 1054 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGL4ES3 | ( | ) |
Returns true if this profile is capable of GL4ES3, i.e.
if isGLES3Compatible() returns true.
Includes [ GL ≥ 4.3, GL ≥ 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
Definition at line 1250 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLCompatibilityProfile | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGLcore | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGLCoreProfile | ( | ) |
| final boolean com.jogamp.opengl.GLContext.isGLDebugEnabled | ( | ) |
Definition at line 793 of file GLContext.java.
|
abstract |
|
abstract |
setGLDebugSynchronous(boolean). | final boolean com.jogamp.opengl.GLContext.isGLES | ( | ) |
Indicates whether this GLContext is capable of GLES.
Includes [ GLES3, GLES1, GLES2 ].
Definition at line 1207 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLES1 | ( | ) |
Indicates whether this GLContext is capable of GLES1.
Includes [ GLES1 ].
Definition at line 1178 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGLES2 | ( | ) |
Indicates whether this GLContext is capable of GLES2.
Definition at line 1186 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGLES2Compatible | ( | ) |
GL_ARB_ES3_compatibility or GL_ARB_ES2_compatibility, otherwise false Definition at line 895 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLES3 | ( | ) |
Indicates whether this GLContext is capable of GLES3.
Includes [ GLES3 ].
Definition at line 1199 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLES31Compatible | ( | ) |
Return true if this context is an ES3 context ≥ 3.1 or implements the extension GL_ARB_ES3_1_compatibility, otherwise false.
Includes [ GL ≥ 4.5, GL ≥ 3.1 w/ GL_ARB_ES3_1_compatibility and GLES3 ≥ 3.1 ]
Definition at line 917 of file GLContext.java.
|
static |
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.
Includes [ GL ≥ 4.5, GL ≥ 3.1 w/ GL_ARB_ES3_1_compatibility and GLES3 ≥ 3.1 ]
Definition at line 2013 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLES32Compatible | ( | ) |
Return true if this context is an ES3 context ≥ 3.2 or implements the extension GL_ARB_ES3_2_compatibility, otherwise false.
Includes [ GL ≥ 4.5, GL ≥ 3.1 w/ GL_ARB_ES3_2_compatibility and GLES3 ≥ 3.2 ]
Definition at line 928 of file GLContext.java.
|
static |
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.
Includes [ GL ≥ 4.5, GL ≥ 3.1 w/ GL_ARB_ES3_2_compatibility and GLES3 ≥ 3.2 ]
Definition at line 2024 of file GLContext.java.
|
static |
| final boolean com.jogamp.opengl.GLContext.isGLES3Compatible | ( | ) |
Return true if this context is an ES3 context or implements the extension GL_ARB_ES3_compatibility, otherwise false.
Includes [ GL ≥ 4.3, GL ≥ 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
Definition at line 906 of file GLContext.java.
|
static |
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.
Includes [ GL ≥ 4.3, GL ≥ 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
Definition at line 2002 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLESProfile | ( | ) |
Definition at line 791 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isGLForwardCompatible | ( | ) |
Definition at line 792 of file GLContext.java.
|
abstract |
Query whether using a distinguished read-drawable is supported.
|
staticprotected |
| device | the device to request whether the profile is available for |
| reqMajor | Key Value either 1, 2, 3 or 4 |
| reqProfile | Key Value either CTX_PROFILE_COMPAT, CTX_PROFILE_CORE or CTX_PROFILE_ES |
| isHardware | return value of one boolean, whether the profile is a hardware rasterizer or not |
Definition at line 1957 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isHardwareRasterizer | ( | ) |
Definition at line 937 of file GLContext.java.
|
static |
1 if using a hardware rasterizer, 0 if using a software rasterizer and -1 if not determined yet. Definition at line 1937 of file GLContext.java.
| boolean com.jogamp.opengl.GLContext.isNPOTTextureAvailable | ( | ) |
Note: The GL impl.
may return a const value, ie GLES2#isNPOTTextureAvailable() always returns true.
Definition at line 1023 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.isShared | ( | ) |
Returns true if this GLContext is shared, otherwise false.
Definition at line 261 of file GLContext.java.
| boolean com.jogamp.opengl.GLContext.isTextureFormatBGRA8888Available | ( | ) |
|
static |
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.
Otherwise returns false.
Returns false if more than one bit of the following list in ctxProfile is set
The minor version number is ignored by the upper limit validation and the major version number may exceed by one.
The upper limit check is relaxed since we don't want to cut-off unforseen new GL version since the release of JOGL.
Hence it is important to iterate through GL version from the upper limit and decrementGLVersion(int, int[], int[]) until invalid.
Definition at line 1578 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.joinSwapGroup | ( | final int | group | ) |
Definition at line 1313 of file GLContext.java.
|
protected |
|
abstract |
Makes this GLContext current on the calling thread.
Recursive call to makeCurrent() and hence release() are supported.
There are two return values that indicate success and one that indicates failure.
A return value of CONTEXT_CURRENT_NEW indicates that that context has been made current for the 1st time, or that the state of the underlying context or drawable has changed since the last time this context was current. In this case, the application may wish to initialize the render state.
A return value of CONTEXT_CURRENT indicates that the context has been made current, with its previous state restored.
If the context could not be made current (for example, because the underlying drawable has not ben realized on the display) , a value of CONTEXT_NOT_CURRENT is returned.
This method is blocking, i.e. waits until another thread has released the context.
The drawable's surface is being locked at entry and unlocked at release()
CONTEXT_CURRENT_NEW if the context was successfully made current the 1st time, CONTEXT_CURRENT if the context was successfully made current, CONTEXT_NOT_CURRENT if the context could not be made current. | GLException | if the context could not be created or made current due to non-recoverable, system-specific errors. |
|
static |
Returns a String representation of the makeCurrent() result.
Definition at line 536 of file GLContext.java.
| final boolean com.jogamp.opengl.GLContext.queryMaxSwapGroups | ( | final int[] | maxGroups, |
| final int | maxGroups_offset, | ||
| final int[] | maxBarriers, | ||
| final int | maxBarriers_offset | ||
| ) |
Definition at line 1306 of file GLContext.java.
|
protected |
|
abstract |
Releases control of this GLContext from the current thread.
Recursive call to release() and hence makeCurrent() are supported.
The drawable's surface is being unlocked at exit, assumed to be locked by makeCurrent().
| GLException | if the context had not previously been made current on the current thread |
|
abstract |
|
protected |
| isInit | true if called for class initialization, otherwise false (re-init or destruction). |
Definition at line 244 of file GLContext.java.
|
staticprotected |
|
abstract |
| flags | 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(). |
|
staticprotected |
Sets the thread-local variable returned by getCurrent and has no other side-effects.
For use by third parties adding new GLContext implementations; not for use by end users.
Definition at line 550 of file GLContext.java.
|
protected |
Definition at line 1301 of file GLContext.java.
|
abstract |
Enables or disables the synchronous debug behavior via glEnable/glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS), if extension is GLExtensions#ARB_debug_output.
There is no equivalent for GLExtensions#AMD_debug_output.
The default is true, ie GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS.
|
abstract |
Sets the read/write drawable for framebuffer operations, i.e.
reassociation of the context's drawable.
If the arguments reflect the current state of this context this method is a no-operation and returns the old and current GLDrawable.
Remarks:
glFinish() is issued if context isCreated() and a previous drawable was bound before disassociation. makeCurrent() and release() while drawable reassociation. drawable's NativeSurfaces to avoid a race condition. In case auto-drawable's are used, their upstream-lock must be locked beforehand see GLAutoDrawable Locking. | readWrite | The read/write drawable for framebuffer operations, maybe null to remove association. |
| setWriteOnly | 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. |
| GLException | in case null is being passed, this context is made current on another thread or operation fails. |
|
abstract |
Set the read-Drawable for read framebuffer operations.
The caller should query if this feature is supported via isGLReadDrawableAvailable().
If the context was current on this thread, it is being released before switching the drawable and made current afterwards. However the user shall take extra care that not other thread attempts to make this context current. Otherwise a race condition may happen.
| read | the read-drawable for read framebuffer operations. If null is passed, the default write drawable will be set. |
| GLException | in case a read drawable is not supported or this context is made current on another thread. |
| boolean com.jogamp.opengl.GLContext.setSwapInterval | ( | final int | interval | ) | throws GLException |
Set the swap interval of the current context and attached onscreen GLDrawable.
offscreen GLDrawable are ignored and false is returned.
The interval semantics:
| interval | see above |
| GLException | if the context is not current. |
Definition at line 1275 of file GLContext.java.
|
protected |
Definition at line 1279 of file GLContext.java.
|
staticprotected |
clears the device/context mappings as well as the GL/GLX proc address tables.
Definition at line 1702 of file GLContext.java.
|
staticprotected |
|
staticprotected |
Definition at line 2103 of file GLContext.java.
| String com.jogamp.opengl.GLContext.toString | ( | ) |
Classname, GL, GLDrawable.
Definition at line 631 of file GLContext.java.
| final void com.jogamp.opengl.GLContext.validateCurrent | ( | ) | throws GLException |
| GLException | if this GLContext is not current on this thread |
Definition at line 529 of file GLContext.java.
|
staticprotected |
Definition at line 1677 of file GLContext.java.
|
static |
Indicates that the context was made current during the last call to makeCurrent, value {@value}.
Definition at line 114 of file GLContext.java.
|
static |
Indicates that a newly-created context was made current during the last call to makeCurrent, value {@value}.
Definition at line 116 of file GLContext.java.
|
static |
Indicates that the context was not made current during the last call to makeCurrent, value {@value}.
Definition at line 112 of file GLContext.java.
|
protected |
The underlying native OpenGL context.
Definition at line 225 of file GLContext.java.
|
staticprotected |
Context uses software rasterizer, otherwise hardware rasterizer.
Cache key value. See isHardwareRasterizer(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 182 of file GLContext.java.
|
staticprotected |
Context option bits, cached bit mask covering 10 bits [0..9], i.e.
0x000003FF, {@value}. Leaving 6 bits for non cached options, i.e. 10:6.
Definition at line 167 of file GLContext.java.
|
staticprotected |
GL_ARB_ES2_compatibility implementation related: Context is compatible w/ ES2.
Not a cache key. See isGLES2Compatible(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 189 of file GLContext.java.
|
staticprotected |
GL_ARB_ES3_1_compatibility implementation related: Context is compatible w/ ES 3.1.
Not a cache key. See isGLES31Compatible(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 195 of file GLContext.java.
|
staticprotected |
GL_ARB_ES3_2_compatibility implementation related: Context is compatible w/ ES 3.2.
Not a cache key. See isGLES32Compatible(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 198 of file GLContext.java.
|
staticprotected |
GL_ARB_ES3_compatibility implementation related: Context is compatible w/ ES3.
Not a cache key. See isGLES3Compatible(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 192 of file GLContext.java.
|
staticprotected |
Context supports basic FBO, details see hasBasicFBOSupport().
Not a cache key.
Definition at line 206 of file GLContext.java.
|
staticprotected |
Context supports OES_single_precision, fp32, fixed function point (FFP) compatibility entry points, see hasFP32CompatAPI().
Not a cache key.
Definition at line 215 of file GLContext.java.
|
staticprotected |
Context option bits, full bit mask covering 16 bits [0..15], i.e.
0x0000FFFF, {@value}.
Definition at line 164 of file GLContext.java.
|
staticprotected |
ARB_create_context related: created via ARB_create_context.
Cache key value. See getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 170 of file GLContext.java.
|
static |
ARB_create_context related: flag debug.
Cache key value. See setContextCreationFlags(int), GLAutoDrawable#setContextCreationFlags(int), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 180 of file GLContext.java.
|
staticprotected |
ARB_create_context related: flag forward compatible.
Cache key value. See getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 178 of file GLContext.java.
|
staticprotected |
ARB_create_context related: desktop compatibility profile.
Cache key value. See isGLCompatibilityProfile(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 172 of file GLContext.java.
|
staticprotected |
ARB_create_context related: desktop core profile.
Cache key value. See isGLCoreProfile(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 174 of file GLContext.java.
|
staticprotected |
ARB_create_context related: ES profile.
Cache key value. See isGLES(), getAvailableContextProperties(AbstractGraphicsDevice, GLProfile).
Definition at line 176 of file GLContext.java.
|
protected |
Definition at line 235 of file GLContext.java.
|
protected |
Definition at line 232 of file GLContext.java.
|
protected |
Definition at line 234 of file GLContext.java.
|
protected |
Definition at line 231 of file GLContext.java.
|
protected |
Definition at line 233 of file GLContext.java.
|
protected |
Definition at line 1318 of file GLContext.java.
|
static |
Definition at line 76 of file GLContext.java.
|
static |
Reflects property jogl.debug.DebugGL.
If true, the debug pipeline is enabled at context creation.
Definition at line 107 of file GLContext.java.
|
static |
Definition at line 78 of file GLContext.java.
|
staticprotected |
Definition at line 1694 of file GLContext.java.
|
protected |
Did the drawable association changed ? see GLRendererQuirks#NoSetSwapIntervalPostRetarget.
Definition at line 239 of file GLContext.java.
|
static |
Definition at line 1530 of file GLContext.java.
|
static |
Definition at line 1523 of file GLContext.java.
|
protected |
Definition at line 236 of file GLContext.java.
|
protected |
Definition at line 222 of file GLContext.java.
|
static |
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:
Otherwise the dedicated GL context would be queried and used:
Using aliasing speeds up initialization about:
Linux x86_64 - AMD : 40%, 1500ms down to 900ms
Can be turned off with property jogl.debug.GLContext.NoProfileAliasing.
Definition at line 104 of file GLContext.java.
|
static |
Reflects property jogl.debug.TraceGL.
If true, the trace pipeline is enabled at context creation.
Definition at line 109 of file GLContext.java.
|
static |
Definition at line 77 of file GLContext.java.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Version 3.0.
As an OpenGL version, it qualifies for desktop isGL2() only, or ES 3.0. Or GLSL 3.00 for ES 3.0.
Definition at line 144 of file GLContext.java.
|
static |
Version 3.1.
As an OpenGL version, it qualifies for isGL3core(), isGL3bc() and isGL3()
Definition at line 147 of file GLContext.java.
|
static |
Version 3.2.
As an OpenGL version, it qualifies for geometry shader
Definition at line 150 of file GLContext.java.
|
static |
Version 4.3.
As an OpenGL version, it qualifies for GL_ARB_ES3_compatibility
Definition at line 153 of file GLContext.java.
|
staticprotected |
Definition at line 155 of file GLContext.java.