public abstract class X11GLContext extends GLContextImpl
| Modifier and Type | Field and Description |
|---|---|
protected long |
context |
protected X11GLDrawable |
drawable |
protected long |
mostRecentDisplay |
DEBUG, functionAvailability, gl, lock, NO_FREE, optimizationEnabled, VERBOSECONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT| Constructor and Description |
|---|
X11GLContext(X11GLDrawable drawable,
GLContext shareWith) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindPbufferToTexture()
Pbuffer support; given that this is a GLContext associated with a
pbuffer, binds this pbuffer to its texture target.
|
void |
copy(GLContext source,
int mask)
Copies selected groups of OpenGL state variables from the
supplied source context into this one.
|
protected abstract void |
create()
Helper routine which usually just turns around and calls
createContext (except for pbuffers, which use a different context
creation mechanism).
|
protected void |
createContext(boolean onscreen)
Creates and initializes an appropriate OpenGL context.
|
protected void |
destroyImpl() |
long |
getContext() |
GLDrawable |
getGLDrawable()
Returns the GLDrawable to which this context may be used to
draw.
|
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.
|
Object |
getPlatformGLExtensions() |
ByteBuffer |
glAllocateMemoryNV(int arg0,
float arg1,
float arg2,
float arg3) |
boolean |
isCreated()
Indicates whether the underlying OpenGL context has been
created.
|
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 boolean |
isFunctionAvailable(String glFunctionName)
Returns true if the specified OpenGL core- or extension-function can be
successfully called using this GL context given the current host (OpenGL
client) and display (OpenGL server) configuration.
|
boolean |
isOptimizable() |
protected void |
lockToolkit() |
protected int |
makeCurrentImpl() |
protected String |
mapToRealGLExtensionName(String glExtensionName)
Maps the given "platform-independent" extension name to a real
function name.
|
protected String |
mapToRealGLFunctionName(String glFunctionName)
Maps the given "platform-independent" function name to a real function
name.
|
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 |
resetGLFunctionAvailability()
Resets the cache of which GL functions are available for calling through this
context.
|
void |
setSwapInterval(int interval) |
protected void |
unlockToolkit() |
createGL, destroy, getBufferSizeTracker, getDeletedObjectTracker, getFloatingPointMode, getGL, getGLProcAddressTable, getObjectTracker, getThreadName, hasWaiters, isSynchronized, makeCurrent, release, resetProcAddressTable, setBufferSizeTracker, setDeletedObjectTracker, setGL, setObjectTracker, setSynchronized, toHexString, updategetCurrent, setCurrentprotected X11GLDrawable drawable
protected long context
protected long mostRecentDisplay
public X11GLContext(X11GLDrawable drawable, GLContext shareWith)
public Object getPlatformGLExtensions()
getPlatformGLExtensions in class GLContextImplpublic GLXExt getGLXExt()
public GLDrawable getGLDrawable()
GLContextgetGLDrawable in class GLContextprotected String mapToRealGLFunctionName(String glFunctionName)
GLContextImplmapToRealGLFunctionName in class GLContextImplprotected String mapToRealGLExtensionName(String glExtensionName)
GLContextImplmapToRealGLExtensionName in class GLContextImplprotected abstract void create()
makeCurrentImpl().protected void createContext(boolean onscreen)
create().protected int makeCurrentImpl()
throws GLException
makeCurrentImpl in class GLContextImplGLExceptionprotected void releaseImpl()
throws GLException
releaseImpl in class GLContextImplGLExceptionprotected void destroyImpl()
throws GLException
destroyImpl in class GLContextImplGLExceptionpublic boolean isCreated()
GLContextImplisCreated in class GLContextImplpublic void copy(GLContext source, int mask) throws GLException
GLContextmask
parameter indicates which groups of state variables are to be
copied. mask contains the bitwise OR of the same
symbolic names that are passed to the GL command glPushAttrib. The single symbolic constant
GL_ALL_ATTRIB_BITS can be used to
copy the maximum possible portion of rendering state.
Not all values for GL state can be copied. For example, pixel
pack and unpack state, render mode state, and select and feedback
state are not copied. The state that can be copied is exactly the
state that is manipulated by the GL command glPushAttrib.
On most platforms, this context may not be current to any thread, including the calling thread, when this method is called. Some platforms have additional requirements such as whether this context or the source context must occasionally be made current in order for the results of the copy to be seen; these requirements are beyond the scope of this specification.
copy in class GLContextsource - the source OpenGL context from which to copy statemask - a mask of symbolic names indicating which groups of state to copyGLException - if an OpenGL-related error occurredprotected void resetGLFunctionAvailability()
GLContextImplGLContextImpl.isFunctionAvailable(String) for more information on
the definition of "available".resetGLFunctionAvailability in class GLContextImplpublic GLXExtProcAddressTable getGLXExtProcAddressTable()
public String getPlatformExtensionsString()
GLContextImplgetPlatformExtensionsString in class GLContextImplprotected boolean isFunctionAvailable(String glFunctionName)
GLContextImplGL.isFunctionAvailable(String) for more details.isFunctionAvailable in class GLContextImplglFunctionName - the name of the OpenGL function (e.g., use
"glPolygonOffsetEXT" to check if the javax.media.opengl.GL#glPolygonOffsetEXT(float,float) is available).public boolean isExtensionAvailable(String glExtensionName)
GLContextImplGL.isExtensionAvailable(String) for more details.isExtensionAvailable in class GLContextImplglExtensionName - the name of the OpenGL extension (e.g.,
"GL_VERTEX_PROGRAM_ARB").public void setSwapInterval(int interval)
setSwapInterval in class GLContextImplpublic ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
glAllocateMemoryNV in class GLContextImplpublic int getOffscreenContextPixelDataType()
GLContextImplgetOffscreenContextPixelDataType in class GLContextImplpublic int getOffscreenContextReadBuffer()
public boolean offscreenImageNeedsVerticalFlip()
GLContextImploffscreenImageNeedsVerticalFlip in class GLContextImplpublic void bindPbufferToTexture()
GLContextImplbindPbufferToTexture in class GLContextImplpublic void releasePbufferFromTexture()
GLContextImplreleasePbufferFromTexture in class GLContextImplpublic boolean isOptimizable()
isOptimizable in class GLContextImplpublic long getContext()
protected void lockToolkit()
protected void unlockToolkit()
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.