|
|||||||||
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
public abstract class GLContextImpl
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
protected FunctionAvailabilityCache |
functionAvailability
|
protected GL |
gl
|
protected GLContextLock |
lock
|
protected static boolean |
NO_FREE
|
protected boolean |
optimizationEnabled
|
protected static boolean |
VERBOSE
|
Fields inherited from class javax.media.opengl.GLContext |
---|
CONTEXT_CURRENT, CONTEXT_CURRENT_NEW, CONTEXT_NOT_CURRENT |
Constructor Summary | |
---|---|
GLContextImpl(GLContext shareWith)
|
|
GLContextImpl(GLContext shareWith,
boolean dontShareWithJava2D)
|
Method Summary | |
---|---|
abstract void |
bindPbufferToTexture()
Pbuffer support; given that this is a GLContext associated with a pbuffer, binds this pbuffer to its texture target. |
protected GL |
createGL()
Create the GL for this context. |
void |
destroy()
Destroys this OpenGL context and frees its associated resources. |
protected abstract void |
destroyImpl()
|
GLBufferSizeTracker |
getBufferSizeTracker()
|
GLObjectTracker |
getDeletedObjectTracker()
|
int |
getFloatingPointMode()
Indicates which floating-point pbuffer implementation is in use. |
GL |
getGL()
Returns the GL pipeline object for this GLContext. |
GLProcAddressTable |
getGLProcAddressTable()
|
GLObjectTracker |
getObjectTracker()
|
abstract int |
getOffscreenContextPixelDataType()
Only called for offscreen contexts; needed by glReadPixels |
abstract 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. |
abstract java.lang.Object |
getPlatformGLExtensions()
|
protected static java.lang.String |
getThreadName()
|
abstract java.nio.ByteBuffer |
glAllocateMemoryNV(int arg0,
float arg1,
float arg2,
float arg3)
|
boolean |
hasWaiters()
|
abstract 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()
|
boolean |
isSynchronized()
Returns true if 'makeCurrent' will exhibit synchronized behavior. |
int |
makeCurrent()
Makes this GLContext current on the calling thread. |
protected abstract int |
makeCurrentImpl()
|
protected abstract java.lang.String |
mapToRealGLExtensionName(java.lang.String glExtensionName)
Maps the given "platform-independent" extension name to a real function name. |
protected abstract java.lang.String |
mapToRealGLFunctionName(java.lang.String glFunctionName)
Maps the given "platform-independent" function name to a real function name. |
abstract 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. |
void |
release()
Releases control of this GLContext from the current thread. |
protected abstract void |
releaseImpl()
|
abstract 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. |
protected void |
resetProcAddressTable(java.lang.Object table)
Helper routine which resets a ProcAddressTable generated by the GLEmitter by looking up anew all of its function pointers. |
void |
setBufferSizeTracker(GLBufferSizeTracker bufferSizeTracker)
|
void |
setDeletedObjectTracker(GLObjectTracker deletedObjectTracker)
|
void |
setGL(GL gl)
Sets the GL pipeline object for this GLContext. |
void |
setObjectTracker(GLObjectTracker tracker)
|
void |
setSwapInterval(int interval)
|
void |
setSynchronized(boolean isSynchronized)
Determines whether 'makeCurrent' will exhibit synchronized behavior. |
static java.lang.String |
toHexString(long hex)
|
protected void |
update()
|
Methods inherited from class javax.media.opengl.GLContext |
---|
copy, getCurrent, getGLDrawable, setCurrent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GLContextLock lock
protected static final boolean DEBUG
protected static final boolean VERBOSE
protected static final boolean NO_FREE
protected boolean optimizationEnabled
protected FunctionAvailabilityCache functionAvailability
protected GL gl
Constructor Detail |
---|
public GLContextImpl(GLContext shareWith)
public GLContextImpl(GLContext shareWith, boolean dontShareWithJava2D)
Method Detail |
---|
public int makeCurrent() throws GLException
GLContext
makeCurrent
in class GLContext
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.protected abstract int makeCurrentImpl() throws GLException
GLException
public void release() throws GLException
GLContext
release
in class GLContext
GLException
- if the context had not previously been made
current on the current threadprotected abstract void releaseImpl() throws GLException
GLException
public void destroy()
GLContext
destroy
in class GLContext
protected abstract void destroyImpl() throws GLException
GLException
protected void update() throws GLException
GLException
public boolean isSynchronized()
GLContext
isSynchronized
in class GLContext
public void setSynchronized(boolean isSynchronized)
GLContext
setSynchronized
in class GLContext
public GL getGL()
GLContext
getGL
in class GLContext
public void setGL(GL gl)
GLContext
setGL
in class GLContext
public abstract java.lang.Object getPlatformGLExtensions()
protected GL createGL()
public GLProcAddressTable getGLProcAddressTable()
public abstract void bindPbufferToTexture()
public abstract void releasePbufferFromTexture()
public abstract java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
public void setSwapInterval(int interval)
protected abstract java.lang.String mapToRealGLFunctionName(java.lang.String glFunctionName)
protected abstract java.lang.String mapToRealGLExtensionName(java.lang.String glExtensionName)
public abstract java.lang.String getPlatformExtensionsString()
protected void resetProcAddressTable(java.lang.Object table)
public abstract boolean isCreated()
protected void resetGLFunctionAvailability()
isFunctionAvailable(String)
for more information on
the definition of "available".
protected boolean isFunctionAvailable(java.lang.String glFunctionName)
GL.isFunctionAvailable(String)
for more details.
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)
GL.isExtensionAvailable(String)
for more details.
glExtensionName
- the name of the OpenGL extension (e.g.,
"GL_VERTEX_PROGRAM_ARB").public int getFloatingPointMode() throws GLException
GLException
public abstract boolean offscreenImageNeedsVerticalFlip()
public abstract int getOffscreenContextPixelDataType()
protected static java.lang.String getThreadName()
public static java.lang.String toHexString(long hex)
public void setBufferSizeTracker(GLBufferSizeTracker bufferSizeTracker)
public GLBufferSizeTracker getBufferSizeTracker()
public void setObjectTracker(GLObjectTracker tracker)
public GLObjectTracker getObjectTracker()
public void setDeletedObjectTracker(GLObjectTracker deletedObjectTracker)
public GLObjectTracker getDeletedObjectTracker()
public boolean isOptimizable()
public boolean hasWaiters()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |