Top Fields Constructors Methods
jogamp.opengl.x11.glx

public Class X11GLXContext

extends GLContextImpl
Class Inheritance
Known Direct Subclasses
jogamp.opengl.x11.glx.X11ExternalGLXContext, jogamp.opengl.x11.glx.X11ExternalGLXDrawable.Context
Imports
java.nio.IntBuffer, java.util.HashMap, .Map, com.jogamp.nativewindow.AbstractGraphicsConfiguration, .AbstractGraphicsDevice, .NativeSurface, com.jogamp.opengl.GLCapabilitiesImmutable, .GLContext, .GLException, .GLProfile, .GLExtensions, jogamp.nativewindow.x11.X11Lib, .X11Util, jogamp.opengl.GLContextImpl, .GLDrawableImpl, .GLDynamicLookupHelper, .GLXExtensions, com.jogamp.common.ExceptionUtils, com.jogamp.common.nio.Buffers, com.jogamp.common.util.VersionNumber, com.jogamp.gluegen.runtime.ProcAddressTable, com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver, com.jogamp.nativewindow.x11.X11GraphicsDevice

Field Summary

Modifier and TypeField and Description
private GLXExt
private static final int
private static final int
private static final int
private static final int
private static final int[]
private static final Map<String, String>
private GLXExtProcAddressTable
protected volatile VersionNumber
private int
private int
hasSwapInterval

3 SGI, 2 GLX_EXT_swap_control_tear, 1 GLX_EXT_swap_control, 0 undefined, -1 none

protected boolean
protected volatile boolean
Inherited from jogamp.opengl.GLContextImpl:
drawabledrawableReadextensionAvailabilityglmappedContextTypeObjectLockmappedExtensionAvailabilityCachemappedGLProcAddressmappedGLXProcAddress

Constructor Summary

AccessConstructor and Description
pack-priv
X11GLXContext(final GLDrawableImpl drawable, final GLContext shareWith)

Method Summary

Modifier and TypeMethod and Description
protected final boolean
bindSwapBarrierImpl(final int group, final int barrier)

Overrides com.jogamp.opengl.GLContext.bindSwapBarrierImpl.

protected void
copyImpl(final GLContext source, final int mask)

Implements abstract jogamp.opengl.GLContextImpl.copyImpl.

protected long
createContextARBImpl(final long
the shared context or null
share
,
final boolean
flag if direct is requested
direct
,
final int
ARB_create_context related, see references below
ctp
,
final int
major number
major
,
final int
minor number
minor
)

Implements abstract jogamp.opengl.GLContextImpl.createContextARBImpl.

Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
protected boolean
createImpl(final long
the shared context handle or 0
shareWithHandle
)

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Platform dependent entry point for context creation.
protected void
destroyContextARBImpl(final long ctx)

Implements abstract jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Destroy the context created by createContextARBImpl.
protected void
protected final void
protected Map<String, String>
protected Map<String, String>
public GLXExt
public final GLXExtProcAddressTable
protected final StringBuilder
public final ProcAddressTable
getPlatformExtProcAddressTable()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..
public Object
private final boolean
glXMakeContextCurrent(final long dpy, final long writeDrawable, final long readDrawable, final long ctx)

private final boolean
glXReleaseContext(final long dpy)

private final int
initSwapGroupImpl(final GLXExt glXExt)

public final boolean
isGLReadDrawableAvailable()

Implements abstract com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Query whether using a distinguished read-drawable is supported.
protected final boolean
protected final boolean
protected void
protected final boolean
queryMaxSwapGroupsImpl(final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset)

Overrides com.jogamp.opengl.GLContext.queryMaxSwapGroupsImpl.

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

Overrides jogamp.opengl.GLContextImpl.resetStates.

protected final Integer
public String
toString()

Overrides com.jogamp.opengl.GLContext.toString.

Classname, GL, GLDrawable
protected final void
updateGLXProcAddressTable(final String
provides a fully qualified key of the context including device and GL profile
contextFQN
,
final GLDynamicLookupHelper dlh)

Implements abstract jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Updates the platform's 'GLX' function cache

Ignoring contextFQN, using GLX+AbstractGraphicsDevice#getUniqueID().

Inherited from jogamp.opengl.GLContextImpl:
addGLDebugListenerassociateDrawablecontextMadeCurrentcopycreateContextARBdestroydrawableUpdatedNotifyenableGLDebugMessagegetBoundFramebuffergetBufferObjectTrackergetBufferStateTrackergetContextCreationFlagsgetContextFQNgetContextFQNgetCreateContextARBAvailStrgetCtxOptionsgetDefaultDrawFramebuffergetDefaultPixelDataFormatgetDefaultPixelDataTypegetDefaultReadBuffergetDefaultReadFramebuffergetDefaultVAOgetDrawableImplgetGLgetGLDebugMessageExtensiongetGLDrawablegetGLDynamicLookupHelpergetGLDynamicLookupHelpergetGLExtensionCountgetGLExtensionsStringgetGLProcAddressTablegetGLReadDrawablegetGLStateTrackergetLockCountgetPlatformExtensionCountgetPlatformExtensionsStringgetRootGLgetSwapIntervalglDebugMessageControlglDebugMessageControlglDebugMessageInserthasWaitersisCreateContextARBAvailisExtensionAvailableisExtensionCacheInitializedisFunctionAvailableisGLDebugMessageEnabledisGLDebugSynchronousisOwnerisSurfacelessmakeCurrentmakeCurrentmapAvailableGLVersionmapToRealGLExtensionNamemapToRealGLFunctionNamereleaseremapAvailableGLVersionsremoveGLDebugListenerresetProcAddressTablesetBoundFramebuffersetContextCreationFlagssetDefaultSwapIntervalsetGLsetGLDebugSynchronoussetGLDrawablesetGLFunctionAvailabilitysetGLReadDrawablesetMappedGLVersionListenersetSwapIntervalsetSwapIntervalNCshutdownImpl

Field Detail

_glXExtback to summary
private GLXExt _glXExt
ctx_arb_attribs_idx_flagsback to summary
private static final int ctx_arb_attribs_idx_flags
ctx_arb_attribs_idx_majorback to summary
private static final int ctx_arb_attribs_idx_major
ctx_arb_attribs_idx_minorback to summary
private static final int ctx_arb_attribs_idx_minor
ctx_arb_attribs_idx_profileback to summary
private static final int ctx_arb_attribs_idx_profile
ctx_arb_attribs_romback to summary
private static final int[] ctx_arb_attribs_rom
extensionNameMapback to summary
private static final Map<String, String> extensionNameMap
glXExtProcAddressTableback to summary
private GLXExtProcAddressTable glXExtProcAddressTable
glXServerVersionback to summary
protected volatile VersionNumber glXServerVersion
hasSwapGroupNVback to summary
private int hasSwapGroupNV
hasSwapIntervalback to summary
private int hasSwapInterval

3 SGI, 2 GLX_EXT_swap_control_tear, 1 GLX_EXT_swap_control, 0 undefined, -1 none

isDirectback to summary
protected boolean isDirect
isGLXVersionGreaterEqualOneThreeback to summary
protected volatile boolean isGLXVersionGreaterEqualOneThree

Constructor Detail

X11GLXContextback to summary
pack-priv X11GLXContext(final GLDrawableImpl drawable, final GLContext shareWith)

Method Detail

bindSwapBarrierImplback to summary
protected final boolean bindSwapBarrierImpl(final int group, final int barrier)

Overrides com.jogamp.opengl.GLContext.bindSwapBarrierImpl.

Annotations
@Override
copyImplback to summary
protected void copyImpl(final GLContext source, final int mask) throws GLException

Implements abstract jogamp.opengl.GLContextImpl.copyImpl.

Annotations
@Override
createContextARBImplback to summary
protected long createContextARBImpl(final long share, final boolean direct, final int ctp, final int major, final int minor)

Implements abstract jogamp.opengl.GLContextImpl.createContextARBImpl.

Doc from jogamp.opengl.GLContextImpl.createContextARBImpl.

Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
This method is called from createContextARB, createImpl(long) .. makeCurrent() .
The implementation shall verify this context with a MakeContextCurrent call.
The implementation must leave the context current.

Parameters
share:long

the shared context or null

direct:boolean

flag if direct is requested

ctp:int

ARB_create_context related, see references below

major:int

major number

minor:int

minor number

Returns:long

the valid and current context if successful, or null

Annotations
@Override
createImplback to summary
protected boolean createImpl(final long shareWithHandle) throws GLException

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Doc from jogamp.opengl.GLContextImpl.createImpl.

Platform dependent entry point for context creation.

This method is called from makeCurrentWithinLock() .. makeCurrent() .

The implementation shall verify this context with a MakeContextCurrent call.

The implementation must leave the context current.

Non fatal context creation failure via return false is currently implemented for: MacOSXCGLContext.

Parameters
shareWithHandle:long

the shared context handle or 0

Returns:boolean

true if successful. Method returns false if the context creation failed non fatally, hence it may be created at a later time. Otherwise method throws GLException.

Annotations
@Override
Exceptions
GLException:
if method fatally fails creating the context and no attempt shall be made at a later time.
destroyContextARBImplback to summary
protected void destroyContextARBImpl(final long ctx)

Implements abstract jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Doc from jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Destroy the context created by createContextARBImpl.

Annotations
@Override
destroyImplback to summary
protected void destroyImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.destroyImpl.

Annotations
@Override
forceGLXVersionOneOneback to summary
protected final void forceGLXVersionOneOne()
getExtensionNameMapback to summary
protected Map<String, String> getExtensionNameMap()

Implements abstract jogamp.opengl.GLContextImpl.getExtensionNameMap.

Annotations
@Override
getFunctionNameMapback to summary
protected Map<String, String> getFunctionNameMap()

Implements abstract jogamp.opengl.GLContextImpl.getFunctionNameMap.

Annotations
@Override
getGLXExtback to summary
public GLXExt getGLXExt()
getGLXExtProcAddressTableback to summary
public final GLXExtProcAddressTable getGLXExtProcAddressTable()
getPlatformExtensionsStringImplback to summary
protected final StringBuilder getPlatformExtensionsStringImpl()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtensionsStringImpl.

Annotations
@Override
getPlatformExtProcAddressTableback to summary
public final ProcAddressTable getPlatformExtProcAddressTable()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Doc from jogamp.opengl.GLContextImpl.getPlatformExtProcAddressTable.

Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..

Annotations
@Override
getPlatformGLExtensionsback to summary
public Object getPlatformGLExtensions()

Implements abstract jogamp.opengl.GLContextImpl.getPlatformGLExtensions.

Annotations
@Override
glXMakeContextCurrentback to summary
private final boolean glXMakeContextCurrent(final long dpy, final long writeDrawable, final long readDrawable, final long ctx)
glXReleaseContextback to summary
private final boolean glXReleaseContext(final long dpy)
initSwapGroupImplback to summary
private final int initSwapGroupImpl(final GLXExt glXExt)
isGLReadDrawableAvailableback to summary
public final boolean isGLReadDrawableAvailable()

Implements abstract com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Doc from com.jogamp.opengl.GLContext.isGLReadDrawableAvailable.

Query whether using a distinguished read-drawable is supported.

Returns:boolean

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

Annotations
@Override
isGLXVersionGreaterEqualOneThreeback to summary
protected final boolean isGLXVersionGreaterEqualOneThree()
joinSwapGroupImplback to summary
protected final boolean joinSwapGroupImpl(final int group)

Overrides com.jogamp.opengl.GLContext.joinSwapGroupImpl.

Annotations
@Override
makeCurrentImplback to summary
protected void makeCurrentImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.makeCurrentImpl.

Annotations
@Override
queryMaxSwapGroupsImplback to summary
protected final boolean queryMaxSwapGroupsImpl(final int[] maxGroups, final int maxGroups_offset, final int[] maxBarriers, final int maxBarriers_offset)

Overrides com.jogamp.opengl.GLContext.queryMaxSwapGroupsImpl.

Annotations
@Override
releaseImplback to summary
protected void releaseImpl() throws GLException

Implements abstract jogamp.opengl.GLContextImpl.releaseImpl.

Annotations
@Override
resetStatesback to summary
protected void resetStates(final boolean isInit)

Overrides jogamp.opengl.GLContextImpl.resetStates.

Parameters
isInit:boolean

Doc from com.jogamp.opengl.GLContext.resetStates.

true if called for class initialization, otherwise false (re-init or destruction).

Annotations
@Override
setSwapIntervalImpl2back to summary
protected final Integer setSwapIntervalImpl2(final int interval)

Implements abstract jogamp.opengl.GLContextImpl.setSwapIntervalImpl2.

Annotations
@Override
toStringback to summary
public String toString()

Overrides com.jogamp.opengl.GLContext.toString.

Doc from com.jogamp.opengl.GLContext.toString.

Classname, GL, GLDrawable

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
updateGLXProcAddressTableback to summary
protected final void updateGLXProcAddressTable(final String contextFQN, final GLDynamicLookupHelper dlh)

Implements abstract jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Doc from jogamp.opengl.GLContextImpl.updateGLXProcAddressTable.

Updates the platform's 'GLX' function cache

Ignoring contextFQN, using GLX+AbstractGraphicsDevice#getUniqueID().

Parameters
contextFQN:String

provides a fully qualified key of the context including device and GL profile

dlh:GLDynamicLookupHelper

GLDynamicLookupHelper used to resetProcAddressTable(ProcAddressTable, GLDynamicLookupHelper) instance.

Annotations
@Override