Top Fields Constructors Methods
jogamp.opengl.windows.wgl

public Class WindowsWGLContext

extends GLContextImpl
Class Inheritance
Known Direct Subclasses
jogamp.opengl.windows.wgl.WindowsExternalWGLContext
Imports
java.nio.IntBuffer, java.util.HashMap, .Map, com.jogamp.nativewindow.AbstractGraphicsConfiguration, .AbstractGraphicsDevice, .NativeSurface, com.jogamp.opengl.GLContext, .GLException, .GLCapabilitiesImmutable, .GLExtensions, .GLProfile, .GLRendererQuirks, com.jogamp.common.ExceptionUtils, com.jogamp.common.nio.Buffers, com.jogamp.gluegen.runtime.ProcAddressTable, com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver, jogamp.nativewindow.windows.GDI, jogamp.opengl.GLContextImpl, .GLDrawableImpl, .GLDynamicLookupHelper, .GLXExtensions

Field Summary

Modifier and TypeField and Description
private WGLExt
pack-priv static final Map<String, String>
private int
private int
hasSwapInterval

2 WGL_EXT_swap_control_tear, 1 WGL_EXT_swap_control, 0 undefined, -1 none

private WGLExtProcAddressTable
private boolean
private boolean
private boolean
private boolean
Inherited from jogamp.opengl.GLContextImpl:
drawabledrawableReadextensionAvailabilityglmappedContextTypeObjectLockmappedExtensionAvailabilityCachemappedGLProcAddressmappedGLXProcAddress

Constructor Summary

AccessConstructor and Description
pack-priv
WindowsWGLContext(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(long
the shared context handle or 0
shareWithHandle
)

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Creates and initializes an appropriate OpenGL context.
protected void
destroyContextARBImpl(final long context)

Implements abstract jogamp.opengl.GLContextImpl.destroyContextARBImpl.

Destroy the context created by createContextARBImpl.
protected void
protected Map<String, String>
protected Map<String, String>
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
pack-priv final WGLExt
public final WGLExtProcAddressTable
private final int
initSwapGroupImpl(final WGLExt wglExt)

public final boolean
isGLReadDrawableAvailable()

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

Query whether using a distinguished read-drawable is supported.
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
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 WGL-AbstractGraphicsDevice#getUniqueID().

private final boolean
wglMakeContextCurrent(final long hDrawDC, final long hReadDC, final long ctx)

private final boolean
Inherited from jogamp.opengl.GLContextImpl:
addGLDebugListenerassociateDrawablecontextMadeCurrentcopycreateContextARBdestroydrawableUpdatedNotifyenableGLDebugMessagegetBoundFramebuffergetBufferObjectTrackergetBufferStateTrackergetContextCreationFlagsgetContextFQNgetContextFQNgetCreateContextARBAvailStrgetCtxOptionsgetDefaultDrawFramebuffergetDefaultPixelDataFormatgetDefaultPixelDataTypegetDefaultReadBuffergetDefaultReadFramebuffergetDefaultVAOgetDrawableImplgetGLgetGLDebugMessageExtensiongetGLDrawablegetGLDynamicLookupHelpergetGLDynamicLookupHelpergetGLExtensionCountgetGLExtensionsStringgetGLProcAddressTablegetGLReadDrawablegetGLStateTrackergetLockCountgetPlatformExtensionCountgetPlatformExtensionsStringgetRootGLgetSwapIntervalglDebugMessageControlglDebugMessageControlglDebugMessageInserthasWaitersisCreateContextARBAvailisExtensionAvailableisExtensionCacheInitializedisFunctionAvailableisGLDebugMessageEnabledisGLDebugSynchronousisOwnerisSurfacelessmakeCurrentmakeCurrentmapAvailableGLVersionmapToRealGLExtensionNamemapToRealGLFunctionNamereleaseremapAvailableGLVersionsremoveGLDebugListenerresetProcAddressTablesetBoundFramebuffersetContextCreationFlagssetDefaultSwapIntervalsetGLsetGLDebugSynchronoussetGLDrawablesetGLFunctionAvailabilitysetGLReadDrawablesetMappedGLVersionListenersetSwapIntervalsetSwapIntervalNCshutdownImpl

Field Detail

_wglExtback to summary
private WGLExt _wglExt
extensionNameMapback to summary
pack-priv static final Map<String, String> extensionNameMap
hasSwapGroupNVback to summary
private int hasSwapGroupNV
hasSwapIntervalback to summary
private int hasSwapInterval

2 WGL_EXT_swap_control_tear, 1 WGL_EXT_swap_control, 0 undefined, -1 none

wglExtProcAddressTableback to summary
private WGLExtProcAddressTable wglExtProcAddressTable
wglGetExtensionsStringEXTAvailableback to summary
private boolean wglGetExtensionsStringEXTAvailable
wglGetExtensionsStringEXTInitializedback to summary
private boolean wglGetExtensionsStringEXTInitialized
wglGLReadDrawableAvailableback to summary
private boolean wglGLReadDrawableAvailable
wglGLReadDrawableAvailableSetback to summary
private boolean wglGLReadDrawableAvailableSet

Constructor Detail

WindowsWGLContextback to summary
pack-priv WindowsWGLContext(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(long shareWithHandle) throws GLException

Implements abstract jogamp.opengl.GLContextImpl.createImpl.

Creates and initializes an appropriate OpenGL context. Should only be called by makeCurrentImpl().

Parameters
shareWithHandle:long

Doc from jogamp.opengl.GLContextImpl.createImpl.

the shared context handle or 0

Returns:boolean

Doc from jogamp.opengl.GLContextImpl.createImpl.

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:

Doc from jogamp.opengl.GLContextImpl.createImpl.

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

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
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
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
getWGLExtback to summary
pack-priv final WGLExt getWGLExt()
getWGLExtProcAddressTableback to summary
public final WGLExtProcAddressTable getWGLExtProcAddressTable()
initSwapGroupImplback to summary
private final int initSwapGroupImpl(final WGLExt wglExt)
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
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
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 WGL-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
wglMakeContextCurrentback to summary
private final boolean wglMakeContextCurrent(final long hDrawDC, final long hReadDC, final long ctx)
wglReleaseContextback to summary
private final boolean wglReleaseContext()