com.jogamp.opengl.impl.windows.wgl
Class WindowsWGLContext

java.lang.Object
  extended by javax.media.opengl.GLContext
      extended by com.jogamp.opengl.impl.GLContextImpl
          extended by com.jogamp.opengl.impl.windows.wgl.WindowsWGLContext
Direct Known Subclasses:
WindowsExternalWGLContext, WindowsOffscreenWGLContext, WindowsOnscreenWGLContext, WindowsPbufferWGLContext

public class WindowsWGLContext
extends GLContextImpl


Field Summary
 
Fields inherited from class com.jogamp.opengl.impl.GLContextImpl
contextFQN, currentSwapInterval, DEBUG, drawable, drawableRead, extensionAvailability, gl, hasNativeES2Methods, lock, mappedContextTypeObjectLock, mappedExtensionAvailabilityCache, mappedGLProcAddress, mappedGLXProcAddress
 
Fields inherited from class javax.media.opengl.GLContext
CONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT, contextHandle, CTX_IS_ARB_CREATED, CTX_OPTION_ANY, CTX_OPTION_DEBUG, CTX_OPTION_FORWARD, CTX_PROFILE_COMPAT, CTX_PROFILE_CORE, CTX_PROFILE_ES, ctxMajorVersion, ctxMinorVersion, ctxOptions, ctxVersionString, DEBUG0, deviceVersionAvailable, GL_VERSIONS
 
Method Summary
 void bindPbufferToTexture()
          Pbuffer support; given that this is a GLContext associated with a pbuffer, binds this pbuffer to its texture target.
protected  void copyImpl(GLContext source, int mask)
           
protected  long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor)
          Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
This method is called from GLContextImpl.createContextARB(long, boolean, int[], int[], int[]).
The implementation shall verify this context with a MakeContextCurrent call.
The implementation shall leave the context current.
protected  boolean createImpl()
          Creates and initializes an appropriate OpenGL context.
protected  void destroyContextARBImpl(long context)
          Destroy the context created by GLContextImpl.createContextARBImpl(long, boolean, int, int, int).
protected  void destroyImpl()
           
protected  Map getExtensionNameMap()
           
protected  Map getFunctionNameMap()
           
 int getOffscreenContextPixelDataType()
          Only called for offscreen contexts; needed by glReadPixels
 int getOffscreenContextReadBuffer()
           
 String getPlatformExtensionsString()
          Returns a non-null (but possibly empty) string containing the space-separated list of available platform-dependent (e.g., WGL, GLX) extensions.
 ProcAddressTable getPlatformExtProcAddressTable()
          Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..
 Object getPlatformGLExtensions()
           
 WGLExtProcAddressTable getWGLExtProcAddressTable()
           
 ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
           
 boolean isGLReadDrawableAvailable()
          Return availability of GL read drawable.
protected  void makeCurrentImpl(boolean newCreated)
           
 boolean offscreenImageNeedsVerticalFlip()
          On some platforms the mismatch between OpenGL's coordinate system (origin at bottom left) and the window system's coordinate system (origin at top left) necessitates a vertical flip of pixels read from offscreen contexts.
protected  void releaseImpl()
           
 void releasePbufferFromTexture()
          Pbuffer support; given that this is a GLContext associated with a pbuffer, releases this pbuffer from its texture target.
protected  void resetState()
           
protected  void setSwapIntervalImpl(int interval)
           
protected  void updateGLXProcAddressTable(int major, int minor, int ctp)
          Updates the platform's 'GLX' function cache
 
Methods inherited from class com.jogamp.opengl.impl.GLContextImpl
copy, createContextARB, createGL, destroy, getBufferSizeTracker, getBufferStateTracker, getDrawableImpl, getFloatingPointMode, getGL, getGLDrawable, getGLExtensionsString, getGLProcAddressTable, getGLReadDrawable, getGLStateTracker, getSwapInterval, hasNativeES2Methods, hasWaiters, isExtensionAvailable, isExtensionCacheInitialized, isFunctionAvailable, isSynchronized, makeCurrent, makeCurrentLocking, mapToRealGLExtensionName, mapToRealGLFunctionName, release, resetProcAddressTable, resetStates, setBufferSizeTracker, setGL, setGLFunctionAvailability, setGLReadDrawable, setSwapInterval, setSynchronized, update
 
Methods inherited from class javax.media.opengl.GLContext
append, compose8bit, composed8BitToString, decrementGLVersion, getAttachedObject, getAttachedObject, getAvailableGLVersion, getAvailableGLVersion, getAvailableGLVersionAsString, getAvailableGLVersionsSet, getComposed8bit, getContextFQN, getCurrent, getCurrentGL, getDeviceVersionAvailableKey, getGLVersion, getGLVersion, getGLVersionMajor, getGLVersionMinor, getHandle, getMaxMajor, getMaxMinor, getThreadName, hasGLSL, isCreated, isCreatedWithARBMethod, isCurrent, isGL2, isGL2Available, isGL2ES1, isGL2ES2, isGL2GL3, isGL3, isGL3Available, isGL3bc, isGL3bcAvailable, isGL4, isGL4Available, isGL4bc, isGL4bcAvailable, isGLCompatibilityProfile, isGLCoreProfile, isGLEmbeddedProfile, isGLES, isGLES1, isGLES1Available, isGLES2, isGLES2Available, isGLForwardCompatible, isGLVersionAvailable, isValidGLVersion, mapAvailableGLVersion, putAttachedObject, putAttachedObject, setAvailableGLVersionsSet, setCurrent, toHexString, toHexString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

resetState

protected void resetState()

getPlatformGLExtensions

public Object getPlatformGLExtensions()
Specified by:
getPlatformGLExtensions in class GLContextImpl

isGLReadDrawableAvailable

public final boolean isGLReadDrawableAvailable()
Description copied from class: GLContext
Return availability of GL read drawable.

Specified by:
isGLReadDrawableAvailable in class GLContext
Returns:
true if a GL read drawable is supported with your driver, otherwise false.

getPlatformExtProcAddressTable

public final ProcAddressTable getPlatformExtProcAddressTable()
Description copied from class: GLContextImpl
Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..

Specified by:
getPlatformExtProcAddressTable in class GLContextImpl

getWGLExtProcAddressTable

public final WGLExtProcAddressTable getWGLExtProcAddressTable()

getFunctionNameMap

protected Map getFunctionNameMap()
Specified by:
getFunctionNameMap in class GLContextImpl

getExtensionNameMap

protected Map getExtensionNameMap()
Specified by:
getExtensionNameMap in class GLContextImpl

destroyContextARBImpl

protected void destroyContextARBImpl(long context)
Description copied from class: GLContextImpl
Destroy the context created by GLContextImpl.createContextARBImpl(long, boolean, int, int, int).

Specified by:
destroyContextARBImpl in class GLContextImpl
See Also:
GLContextImpl.makeCurrent(), GLContextImpl.makeCurrentImpl(boolean), #create, GLContextImpl.createContextARB(long, boolean, int[], int[], int[]), GLContextImpl.createContextARBImpl(long, boolean, int, int, int), GLContextImpl.destroyContextARBImpl(long)

createContextARBImpl

protected long createContextARBImpl(long share,
                                    boolean direct,
                                    int ctp,
                                    int major,
                                    int minor)
Description copied from class: GLContextImpl
Platform dependent but harmonized implementation of the ARB_create_context mechanism to create a context.
This method is called from GLContextImpl.createContextARB(long, boolean, int[], int[], int[]).
The implementation shall verify this context with a MakeContextCurrent call.
The implementation shall leave the context current.

Specified by:
createContextARBImpl in class GLContextImpl
Parameters:
share - the shared context or null
direct - flag if direct is requested
ctp - ARB_create_context related, see references below
major - major number
minor - minor number
Returns:
the valid context if successfull, or null
See Also:
GLContextImpl.makeCurrent(), GLContext.CTX_PROFILE_COMPAT, GLContext.CTX_OPTION_FORWARD, GLContext.CTX_OPTION_DEBUG, GLContextImpl.makeCurrentImpl(boolean), #create, GLContextImpl.createContextARB(long, boolean, int[], int[], int[]), GLContextImpl.createContextARBImpl(long, boolean, int, int, int), GLContextImpl.destroyContextARBImpl(long)

createImpl

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

Specified by:
createImpl in class GLContextImpl

makeCurrentImpl

protected void makeCurrentImpl(boolean newCreated)
                        throws GLException
Specified by:
makeCurrentImpl in class GLContextImpl
Throws:
GLException

releaseImpl

protected void releaseImpl()
                    throws GLException
Specified by:
releaseImpl in class GLContextImpl
Throws:
GLException

destroyImpl

protected void destroyImpl()
                    throws GLException
Specified by:
destroyImpl in class GLContextImpl
Throws:
GLException

copyImpl

protected void copyImpl(GLContext source,
                        int mask)
                 throws GLException
Specified by:
copyImpl in class GLContextImpl
Throws:
GLException

updateGLXProcAddressTable

protected final void updateGLXProcAddressTable(int major,
                                               int minor,
                                               int ctp)
Description copied from class: GLContextImpl
Updates the platform's 'GLX' function cache

Specified by:
updateGLXProcAddressTable in class GLContextImpl

getPlatformExtensionsString

public String getPlatformExtensionsString()
Description copied from class: GLContext
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.

Overrides:
getPlatformExtensionsString in class GLContextImpl

setSwapIntervalImpl

protected void setSwapIntervalImpl(int interval)
Overrides:
setSwapIntervalImpl in class GLContextImpl

glAllocateMemoryNV

public ByteBuffer glAllocateMemoryNV(int arg0,
                                     float arg1,
                                     float arg2,
                                     float arg3)
Specified by:
glAllocateMemoryNV in class GLContextImpl

getOffscreenContextPixelDataType

public int getOffscreenContextPixelDataType()
Description copied from class: GLContextImpl
Only called for offscreen contexts; needed by glReadPixels

Specified by:
getOffscreenContextPixelDataType in class GLContextImpl

getOffscreenContextReadBuffer

public int getOffscreenContextReadBuffer()

offscreenImageNeedsVerticalFlip

public boolean offscreenImageNeedsVerticalFlip()
Description copied from class: GLContextImpl
On some platforms the mismatch between OpenGL's coordinate system (origin at bottom left) and the window system's coordinate system (origin at top left) necessitates a vertical flip of pixels read from offscreen contexts.

Specified by:
offscreenImageNeedsVerticalFlip in class GLContextImpl

bindPbufferToTexture

public void bindPbufferToTexture()
Description copied from class: GLContextImpl
Pbuffer support; given that this is a GLContext associated with a pbuffer, binds this pbuffer to its texture target.

Specified by:
bindPbufferToTexture in class GLContextImpl

releasePbufferFromTexture

public void releasePbufferFromTexture()
Description copied from class: GLContextImpl
Pbuffer support; given that this is a GLContext associated with a pbuffer, releases this pbuffer from its texture target.

Specified by:
releasePbufferFromTexture in class GLContextImpl


Copyright 2010 JogAmp Community.