com.sun.opengl.impl.x11

Class X11ExternalGLContext


public class X11ExternalGLContext
extends X11GLContext

Field Summary

Fields inherited from class com.sun.opengl.impl.x11.X11GLContext

context, drawable, mostRecentDisplay

Fields inherited from class com.sun.opengl.impl.GLContextImpl

DEBUG, NO_FREE, VERBOSE, functionAvailability, gl, lock, optimizationEnabled

Fields inherited from class javax.media.opengl.GLContext

CONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT

Constructor Summary

X11ExternalGLContext()

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()
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, create, createContext, destroyImpl, getContext, getGLDrawable, getGLXExt, getGLXExtProcAddressTable, getOffscreenContextPixelDataType, getOffscreenContextReadBuffer, getPlatformExtensionsString, getPlatformGLExtensions, glAllocateMemoryNV, isCreated, isExtensionAvailable, isFunctionAvailable, isOptimizable, lockToolkit, makeCurrentImpl, mapToRealGLExtensionName, mapToRealGLFunctionName, offscreenImageNeedsVerticalFlip, releaseImpl, releasePbufferFromTexture, resetGLFunctionAvailability, setSwapInterval, unlockToolkit

Methods inherited from class com.sun.opengl.impl.GLContextImpl

bindPbufferToTexture, createGL, destroy, destroyImpl, getDeletedObjectTracker, getFloatingPointMode, getGL, getGLProcAddressTable, getObjectTracker, getOffscreenContextPixelDataType, getPlatformExtensionsString, getPlatformGLExtensions, getThreadName, glAllocateMemoryNV, hasWaiters, isCreated, isExtensionAvailable, isFunctionAvailable, isOptimizable, isSynchronized, makeCurrent, makeCurrentImpl, mapToRealGLExtensionName, mapToRealGLFunctionName, offscreenImageNeedsVerticalFlip, release, releaseImpl, releasePbufferFromTexture, resetGLFunctionAvailability, resetProcAddressTable, setDeletedObjectTracker, setGL, setObjectTracker, setSwapInterval, setSynchronized, toHexString, update

Methods inherited from class javax.media.opengl.GLContext

destroy, getCurrent, getGL, getGLDrawable, isSynchronized, makeCurrent, release, setCurrent, setGL, setSynchronized

Constructor Details

X11ExternalGLContext

public X11ExternalGLContext()

Method Details

create

protected void create()
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 makeCurrentImpl().
Overrides:
create in interface X11GLContext

destroyImpl

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

isCreated

public boolean isCreated()
Overrides:
isCreated in interface X11GLContext

makeCurrent

public int makeCurrent()
            throws GLException
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 interface 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.

makeCurrentImpl

protected int makeCurrentImpl()
            throws GLException
Overrides:
makeCurrentImpl in interface X11GLContext

release

public void release()
            throws GLException
Releases control of this GLContext from the current thread.
Overrides:
release in interface GLContextImpl
Throws:
GLException - if the context had not previously been made current on the current thread

releaseImpl

protected void releaseImpl()
            throws GLException
Overrides:
releaseImpl in interface X11GLContext

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.