com.sun.opengl.impl.x11
Class X11ExternalGLContext
java.lang.Object
javax.media.opengl.GLContext
com.sun.opengl.impl.GLContextImpl
com.sun.opengl.impl.x11.X11GLContext
com.sun.opengl.impl.x11.X11ExternalGLContext
public class X11ExternalGLContext
- extends X11GLContext
Method Summary |
protected void |
create()
Helper routine which usually just turns around and calls
createContext (except for pbuffers, which use a different context
creation mechanism). |
protected void |
destroyImpl()
|
boolean |
isCreated()
Indicates whether the underlying OpenGL context has been
created. |
int |
makeCurrent()
Makes this GLContext current on the calling thread. |
protected int |
makeCurrentImpl()
|
void |
release()
Releases control of this GLContext from the current thread. |
protected void |
releaseImpl()
|
Methods inherited from class com.sun.opengl.impl.x11.X11GLContext |
bindPbufferToTexture, copy, createContext, getContext, getGLDrawable, getGLXExt, getGLXExtProcAddressTable, getOffscreenContextPixelDataType, getOffscreenContextReadBuffer, getPlatformExtensionsString, getPlatformGLExtensions, glAllocateMemoryNV, isExtensionAvailable, isFunctionAvailable, isOptimizable, lockToolkit, mapToRealGLExtensionName, mapToRealGLFunctionName, offscreenImageNeedsVerticalFlip, releasePbufferFromTexture, resetGLFunctionAvailability, setSwapInterval, unlockToolkit |
Methods inherited from class com.sun.opengl.impl.GLContextImpl |
createGL, destroy, getBufferSizeTracker, getDeletedObjectTracker, getFloatingPointMode, getGL, getGLProcAddressTable, getObjectTracker, getThreadName, hasWaiters, isSynchronized, resetProcAddressTable, setBufferSizeTracker, setDeletedObjectTracker, setGL, setObjectTracker, setSynchronized, toHexString, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X11ExternalGLContext
public X11ExternalGLContext()
create
protected void create()
- Description copied from class:
X11GLContext
- Helper routine which usually just turns around and calls
createContext (except for pbuffers, which use a different context
creation mechanism). Should only be called by
X11GLContext.makeCurrentImpl()
.
- Specified by:
create
in class X11GLContext
makeCurrent
public int makeCurrent()
throws GLException
- Description copied from class:
GLContext
- Makes this GLContext current on the calling thread.
There are two return values that indicate success and one that
indicates failure. A return value of CONTEXT_CURRENT_NEW
indicates that that context has been made current, and that
this is the first time this context has been made current, or
that the state of the underlying context or drawable may have
changed since the last time this context was made current. In
this case, the application may wish to initialize the state. A
return value of CONTEXT_CURRENT indicates that the context has
been made currrent, with its previous state restored.
If the context could not be made current (for example, because
the underlying drawable has not ben realized on the display) ,
a value of CONTEXT_NOT_CURRENT is returned.
If the context is in use by another thread at the time of the
call, then if isSynchronized() is true the call will
block. If isSynchronized() is false, an exception will be
thrown and the context will remain current on the other thread.
- Overrides:
makeCurrent
in class GLContextImpl
- Returns:
- CONTEXT_CURRENT if the context was successfully made current
- Throws:
GLException
- if synchronization is disabled and the
context is current on another thread, or because the context
could not be created or made current due to non-recoverable,
window system-specific errors.
release
public void release()
throws GLException
- Description copied from class:
GLContext
- Releases control of this GLContext from the current thread.
- Overrides:
release
in class GLContextImpl
- Throws:
GLException
- if the context had not previously been made
current on the current thread
makeCurrentImpl
protected int makeCurrentImpl()
throws GLException
- Overrides:
makeCurrentImpl
in class X11GLContext
- Throws:
GLException
releaseImpl
protected void releaseImpl()
throws GLException
- Overrides:
releaseImpl
in class X11GLContext
- Throws:
GLException
destroyImpl
protected void destroyImpl()
throws GLException
- Overrides:
destroyImpl
in class X11GLContext
- Throws:
GLException
isCreated
public boolean isCreated()
- Description copied from class:
GLContextImpl
- Indicates whether the underlying OpenGL context has been
created. This is used to manage sharing of display lists and
textures between contexts.
- Overrides:
isCreated
in class X11GLContext
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.