com.jogamp.opengl.impl.x11.glx
Class X11GLXContext

java.lang.Object
  extended by javax.media.opengl.GLContext
      extended by com.jogamp.opengl.impl.GLContextImpl
          extended by com.jogamp.opengl.impl.x11.glx.X11GLXContext
Direct Known Subclasses:
X11ExternalGLXContext, X11OffscreenGLXContext, X11OnscreenGLXContext, X11PbufferGLXContext

public abstract class X11GLXContext
extends GLContextImpl


Field Summary
protected  boolean isDirect
           
 
Fields inherited from class com.jogamp.opengl.impl.GLContextImpl
currentSwapInterval, DEBUG, drawable, drawableRead, extensionAvailability, gl, lock, VERBOSE
 
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, GL_VERSIONS, mappedVersionsAvailable, mappedVersionsAvailableLock, mappedVersionsAvailableSet
 
Constructor Summary
X11GLXContext(GLDrawableImpl drawable, GLContext shareWith)
           
X11GLXContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead, GLContext shareWith)
           
 
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  boolean createContext(boolean direct)
          Creates and initializes an appropriate OpenGL context.
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.
protected  void destroyContextARBImpl(long ctx)
          Destroy the context created by GLContextImpl.createContextARBImpl(long, boolean, int, int, int).
protected  void destroyImpl()
           
protected  Map getExtensionNameMap()
           
protected  Map getFunctionNameMap()
           
 GLXExt getGLXExt()
           
 GLXExtProcAddressTable getGLXExtProcAddressTable()
           
 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.
 com.jogamp.gluegen.runtime.ProcAddressTable getPlatformExtProcAddressTable()
          Shall return the platform extension ProcAddressTable, ie for GLXExt, EGLExt, ..
 Object getPlatformGLExtensions()
           
 ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
           
protected  boolean glXMakeContextCurrent(long dpy, long writeDrawable, long readDrawable, long ctx)
           
 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.
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 setSwapIntervalImpl(int interval)
           
 String toString()
          Classname, GL, GLDrawable
protected  void updateGLProcAddressTable(int major, int minor, int ctp)
          Updates the cache of which GL functions are available for calling through this context.
 
Methods inherited from class com.jogamp.opengl.impl.GLContextImpl
copy, createContextARB, createGL, createImpl, destroy, getBufferSizeTracker, getBufferStateTracker, getDrawableImpl, getFloatingPointMode, getGL, getGLDrawable, getGLDrawableRead, getGLExtensions, getGLProcAddressTable, getGLStateTracker, getSwapInterval, getThreadName, hasWaiters, isExtensionCacheInitialized, isFunctionAvailable, isSynchronized, makeCurrent, makeCurrentLocking, mapToRealGLExtensionName, mapToRealGLFunctionName, release, resetProcAddressTable, setBufferSizeTracker, setContextVersion, setGL, setGLDrawableRead, setGLFunctionAvailability, setSwapInterval, setSynchronized, update
 
Methods inherited from class javax.media.opengl.GLContext
append, compose8bit, composed8BitToString, decrementGLVersion, getAttachedObject, getAttachedObject, getComposed8bit, getCurrent, getCurrentGL, getGLVersion, getGLVersion, getGLVersionAvailable, getGLVersionAvailable, getGLVersionMajor, getGLVersionMinor, getHandle, getMaxMajor, getMaxMinor, hasGLSL, isCreated, isCreatedWithARBMethod, isCurrent, isGL2, isGL2Available, isGL2ES1, isGL2ES2, isGL2GL3, isGL3, isGL3Available, isGL3bc, isGL3bcAvailable, isGL4, isGL4Available, isGL4bc, isGL4bcAvailable, isGLCompatibilityProfile, isGLCoreProfile, isGLEmbeddedProfile, isGLES, isGLES1, isGLES2, isGLForwardCompatible, isGLVersionAvailable, isValidGLVersion, mapVersionAvailable, putAttachedObject, putAttachedObject, setCurrent, toHexString, toHexString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isDirect

protected boolean isDirect
Constructor Detail

X11GLXContext

public X11GLXContext(GLDrawableImpl drawable,
                     GLDrawableImpl drawableRead,
                     GLContext shareWith)

X11GLXContext

public X11GLXContext(GLDrawableImpl drawable,
                     GLContext shareWith)
Method Detail

getPlatformExtProcAddressTable

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

Specified by:
getPlatformExtProcAddressTable in class GLContextImpl

getGLXExtProcAddressTable

public final GLXExtProcAddressTable getGLXExtProcAddressTable()

getPlatformGLExtensions

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

getGLXExt

public GLXExt getGLXExt()

getFunctionNameMap

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

getExtensionNameMap

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

glXMakeContextCurrent

protected boolean glXMakeContextCurrent(long dpy,
                                        long writeDrawable,
                                        long readDrawable,
                                        long ctx)

destroyContextARBImpl

protected void destroyContextARBImpl(long ctx)
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.

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)

createContext

protected boolean createContext(boolean direct)
Creates and initializes an appropriate OpenGL context. Should only be called by #create(). Note: The direct parameter may be overwritten by the direct state of a shared context.


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

updateGLProcAddressTable

protected void updateGLProcAddressTable(int major,
                                        int minor,
                                        int ctp)
Description copied from class: GLContextImpl
Updates the cache of which GL functions are available for calling through this context. See GLContextImpl.isFunctionAvailable(String) for more information on the definition of "available".

Overrides:
updateGLProcAddressTable in class GLContextImpl
See Also:
GLContextImpl.setContextVersion(int, int, int)

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

isExtensionAvailable

public boolean isExtensionAvailable(String glExtensionName)
Description copied from class: GLContextImpl
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 GLBase.isExtensionAvailable(String) for more details.

Overrides:
isExtensionAvailable in class GLContextImpl
Parameters:
glExtensionName - the name of the OpenGL extension (e.g., "GL_VERTEX_PROGRAM_ARB").

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

toString

public String toString()
Description copied from class: GLContext
Classname, GL, GLDrawable

Overrides:
toString in class GLContext


Copyright 2010 JogAmp Community.