net.java.games.jogl.impl.x11

Class X11GLContext

Known Direct Subclasses:
X11OffscreenGLContext, X11OnscreenGLContext, X11PbufferGLContext

public abstract class X11GLContext
extends GLContext

Field Summary

protected long
context
protected long
display
protected long
drawable
protected static boolean
isLinuxAMD64
protected long
mostRecentDisplay
protected long
visualID

Fields inherited from class net.java.games.jogl.impl.GLContext

DEBUG, NO_FREE, VERBOSE, autoSwapBuffers, capabilities, chooser, component, deferredDestroy, deferredReshapeAction, deferredSetRealized, functionAvailability, gl, glu, gluProcAddressTable, haveResetGLUProcAddressTable, noAutoRedraw, pendingOffscreenHeight, pendingOffscreenResize, pendingOffscreenWidth, perThreadContextStack, perThreadRenderingContext, perThreadSavedCurrentContext, realized, renderingThread, willSetRenderingThread

Constructor Summary

X11GLContext(Component component, GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLContext shareWith)

Method Summary

protected XVisualInfo
chooseVisual()
protected void
chooseVisualAndCreateContext(boolean onscreen)
protected abstract void
create()
Creates and initializes an appropriate OpenGl context.
protected long
createContext(XVisualInfo vis, boolean onscreen)
protected GL
createGL()
protected void
destroyImpl()
protected long
dynamicLookupFunction(String glFuncName)
protected void
free()
protected long
getContext()
GLProcAddressTable
getGLProcAddressTable()
protected JAWT
getJAWT()
int
getOffscreenContextHeight()
int
getOffscreenContextPixelDataType()
abstract int
getOffscreenContextReadBuffer()
int
getOffscreenContextWidth()
String
getPlatformExtensionsString()
boolean
isCreated()
boolean
isExtensionAvailable(String glExtensionName)
protected boolean
isFunctionAvailable(String glFunctionName)
protected abstract boolean
isOffscreen()
protected void
lockAWT()
protected boolean
makeCurrent(Runnable initAction)
protected String
mapToRealGLExtensionName(String glExtensionName)
protected String
mapToRealGLFunctionName(String glFunctionName)
abstract boolean
offscreenImageNeedsVerticalFlip()
protected void
resetGLFunctionAvailability()
void
setRenderingThread(Thread currentThreadOrNull, Runnable initAction)
abstract void
swapBuffers()
protected void
unlockAWT()

Methods inherited from class net.java.games.jogl.impl.GLContext

bindPbufferToTexture, canCreatePbufferContext, createGL, createPbufferContext, destroy, destroyImpl, dynamicLookupFunction, free, getAutoSwapBufferMode, getFloatingPointMode, getGL, getGLU, getNoAutoRedrawMode, getOffscreenContextHeight, getOffscreenContextPixelDataType, getOffscreenContextReadBuffer, getOffscreenContextWidth, getPerThreadContextStack, getPerThreadSavedCurrentContext, getPerThreadSavedInitAction, getPlatformExtensionsString, getRealized, getRenderingThread, getThreadName, invokeGL, isCreated, isExtensionAvailable, isFunctionAvailable, isOffscreen, isRealized, makeCurrent, mapToRealGLExtensionName, mapToRealGLFunctionName, offscreenImageNeedsVerticalFlip, releasePbufferFromTexture, resetGLFunctionAvailability, resetProcAddressTable, resizeOffscreenContext, setAutoSwapBufferMode, setGL, setGLU, setNoAutoRedrawMode, setPerThreadSavedCurrentContext, setRealized, setRealized, setRenderingThread, setSwapInterval, swapBuffers, willSetRenderingThread

Field Details

context

protected long context

display

protected long display

drawable

protected long drawable

isLinuxAMD64

protected static boolean isLinuxAMD64

mostRecentDisplay

protected long mostRecentDisplay

visualID

protected long visualID

Constructor Details

X11GLContext

public X11GLContext(Component component,
                    GLCapabilities capabilities,
                    GLCapabilitiesChooser chooser,
                    GLContext shareWith)

Method Details

chooseVisual

protected XVisualInfo chooseVisual()

chooseVisualAndCreateContext

protected void chooseVisualAndCreateContext(boolean onscreen)

create

protected abstract void create()
Creates and initializes an appropriate OpenGl context. Should only be called by makeCurrent(Runnable).

createContext

protected long createContext(XVisualInfo vis,
                             boolean onscreen)

createGL

protected GL createGL()
Overrides:
createGL in interface GLContext

destroyImpl

protected void destroyImpl()
            throws GLException
Overrides:
destroyImpl in interface GLContext

dynamicLookupFunction

protected long dynamicLookupFunction(String glFuncName)
Overrides:
dynamicLookupFunction in interface GLContext

free

protected void free()
            throws GLException
Overrides:
free in interface GLContext

getContext

protected long getContext()

getGLProcAddressTable

public GLProcAddressTable getGLProcAddressTable()

getJAWT

protected JAWT getJAWT()

getOffscreenContextHeight

public int getOffscreenContextHeight()
Overrides:
getOffscreenContextHeight in interface GLContext

getOffscreenContextPixelDataType

public int getOffscreenContextPixelDataType()
Overrides:
getOffscreenContextPixelDataType in interface GLContext

getOffscreenContextReadBuffer

public abstract int getOffscreenContextReadBuffer()
Overrides:
getOffscreenContextReadBuffer in interface GLContext

getOffscreenContextWidth

public int getOffscreenContextWidth()
Overrides:
getOffscreenContextWidth in interface GLContext

getPlatformExtensionsString

public String getPlatformExtensionsString()
Overrides:
getPlatformExtensionsString in interface GLContext

isCreated

public boolean isCreated()
Overrides:
isCreated in interface GLContext

isExtensionAvailable

public boolean isExtensionAvailable(String glExtensionName)
Overrides:
isExtensionAvailable in interface GLContext

isFunctionAvailable

protected boolean isFunctionAvailable(String glFunctionName)
Overrides:
isFunctionAvailable in interface GLContext

isOffscreen

protected abstract boolean isOffscreen()
Overrides:
isOffscreen in interface GLContext

lockAWT

protected void lockAWT()

makeCurrent

protected boolean makeCurrent(Runnable initAction)
            throws GLException
Overrides:
makeCurrent in interface GLContext

mapToRealGLExtensionName

protected String mapToRealGLExtensionName(String glExtensionName)
Overrides:
mapToRealGLExtensionName in interface GLContext

mapToRealGLFunctionName

protected String mapToRealGLFunctionName(String glFunctionName)
Overrides:
mapToRealGLFunctionName in interface GLContext

offscreenImageNeedsVerticalFlip

public abstract boolean offscreenImageNeedsVerticalFlip()
Overrides:
offscreenImageNeedsVerticalFlip in interface GLContext

resetGLFunctionAvailability

protected void resetGLFunctionAvailability()
Overrides:
resetGLFunctionAvailability in interface GLContext

setRenderingThread

public void setRenderingThread(Thread currentThreadOrNull,
                               Runnable initAction)
Overrides:
setRenderingThread in interface GLContext

swapBuffers

public abstract void swapBuffers()
            throws GLException
Overrides:
swapBuffers in interface GLContext

unlockAWT

protected void unlockAWT()