|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.opengl.GLContext
com.sun.opengl.impl.GLContextImpl
com.sun.opengl.impl.x11.X11GLContext
public abstract class X11GLContext
Field Summary | |
---|---|
protected long |
context
|
protected X11GLDrawable |
drawable
|
protected long |
mostRecentDisplay
|
Fields inherited from class com.sun.opengl.impl.GLContextImpl |
---|
DEBUG, functionAvailability, gl, lock, NO_FREE, optimizationEnabled, VERBOSE |
Fields inherited from class javax.media.opengl.GLContext |
---|
CONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT |
Constructor Summary | |
---|---|
X11GLContext(X11GLDrawable drawable,
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. |
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()
|
java.lang.String |
getPlatformExtensionsString()
Returns a non-null (but possibly empty) string containing the space-separated list of available platform-dependent (e.g., WGL, GLX) extensions. |
java.lang.Object |
getPlatformGLExtensions()
|
java.nio.ByteBuffer |
glAllocateMemoryNV(int arg0,
float arg1,
float arg2,
float arg3)
|
boolean |
isCreated()
Indicates whether the underlying OpenGL context has been created. |
boolean |
isExtensionAvailable(java.lang.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(java.lang.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 java.lang.String |
mapToRealGLExtensionName(java.lang.String glExtensionName)
Maps the given "platform-independent" extension name to a real function name. |
protected java.lang.String |
mapToRealGLFunctionName(java.lang.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()
|
Methods inherited from class com.sun.opengl.impl.GLContextImpl |
---|
createGL, destroy, getBufferSizeTracker, getDeletedObjectTracker, getFloatingPointMode, getGL, getGLProcAddressTable, getObjectTracker, getThreadName, hasWaiters, isSynchronized, makeCurrent, release, resetProcAddressTable, setBufferSizeTracker, setDeletedObjectTracker, setGL, setObjectTracker, setSynchronized, toHexString, update |
Methods inherited from class javax.media.opengl.GLContext |
---|
getCurrent, setCurrent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected X11GLDrawable drawable
protected long context
protected long mostRecentDisplay
Constructor Detail |
---|
public X11GLContext(X11GLDrawable drawable, GLContext shareWith)
Method Detail |
---|
public java.lang.Object getPlatformGLExtensions()
getPlatformGLExtensions
in class GLContextImpl
public GLXExt getGLXExt()
public GLDrawable getGLDrawable()
GLContext
getGLDrawable
in class GLContext
protected java.lang.String mapToRealGLFunctionName(java.lang.String glFunctionName)
GLContextImpl
mapToRealGLFunctionName
in class GLContextImpl
protected java.lang.String mapToRealGLExtensionName(java.lang.String glExtensionName)
GLContextImpl
mapToRealGLExtensionName
in class GLContextImpl
protected abstract void create()
makeCurrentImpl()
.
protected void createContext(boolean onscreen)
create()
.
protected int makeCurrentImpl() throws GLException
makeCurrentImpl
in class GLContextImpl
GLException
protected void releaseImpl() throws GLException
releaseImpl
in class GLContextImpl
GLException
protected void destroyImpl() throws GLException
destroyImpl
in class GLContextImpl
GLException
public boolean isCreated()
GLContextImpl
isCreated
in class GLContextImpl
public void copy(GLContext source, int mask) throws GLException
GLContext
mask
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 GLContext
source
- the source OpenGL context from which to copy statemask
- a mask of symbolic names indicating which groups of state to copy
GLException
- if an OpenGL-related error occurredprotected void resetGLFunctionAvailability()
GLContextImpl
GLContextImpl.isFunctionAvailable(String)
for more information on
the definition of "available".
resetGLFunctionAvailability
in class GLContextImpl
public GLXExtProcAddressTable getGLXExtProcAddressTable()
public java.lang.String getPlatformExtensionsString()
GLContextImpl
getPlatformExtensionsString
in class GLContextImpl
protected boolean isFunctionAvailable(java.lang.String glFunctionName)
GLContextImpl
GL.isFunctionAvailable(String)
for more details.
isFunctionAvailable
in class GLContextImpl
glFunctionName
- 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(java.lang.String glExtensionName)
GLContextImpl
GL.isExtensionAvailable(String)
for more details.
isExtensionAvailable
in class GLContextImpl
glExtensionName
- the name of the OpenGL extension (e.g.,
"GL_VERTEX_PROGRAM_ARB").public void setSwapInterval(int interval)
setSwapInterval
in class GLContextImpl
public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
glAllocateMemoryNV
in class GLContextImpl
public int getOffscreenContextPixelDataType()
GLContextImpl
getOffscreenContextPixelDataType
in class GLContextImpl
public int getOffscreenContextReadBuffer()
public boolean offscreenImageNeedsVerticalFlip()
GLContextImpl
offscreenImageNeedsVerticalFlip
in class GLContextImpl
public void bindPbufferToTexture()
GLContextImpl
bindPbufferToTexture
in class GLContextImpl
public void releasePbufferFromTexture()
GLContextImpl
releasePbufferFromTexture
in class GLContextImpl
public boolean isOptimizable()
isOptimizable
in class GLContextImpl
public long getContext()
protected void lockToolkit()
protected void unlockToolkit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |