com.sun.opengl.impl.x11

Class X11GLContext

Known Direct Subclasses:
X11ExternalGLContext, X11OffscreenGLContext, X11OnscreenGLContext, X11PbufferGLContext

public abstract class X11GLContext
extends GLContextImpl

Field Summary

protected long
context
protected X11GLDrawable
drawable
protected long
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

X11GLContext(X11GLDrawable drawable, GLContext shareWith)

Method Summary

void
bindPbufferToTexture()
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()
int
getOffscreenContextReadBuffer()
String
getPlatformExtensionsString()
Object
getPlatformGLExtensions()
ByteBuffer
glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3)
boolean
isCreated()
boolean
isExtensionAvailable(String glExtensionName)
protected boolean
isFunctionAvailable(String glFunctionName)
boolean
isOptimizable()
protected void
lockToolkit()
protected int
makeCurrentImpl()
protected String
mapToRealGLExtensionName(String glExtensionName)
protected String
mapToRealGLFunctionName(String glFunctionName)
boolean
offscreenImageNeedsVerticalFlip()
protected void
releaseImpl()
void
releasePbufferFromTexture()
protected void
resetGLFunctionAvailability()
void
setSwapInterval(int interval)
protected void
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

Field Details

context

protected long context

drawable

protected X11GLDrawable drawable

mostRecentDisplay

protected long mostRecentDisplay

Constructor Details

X11GLContext

public X11GLContext(X11GLDrawable drawable,
                    GLContext shareWith)

Method Details

bindPbufferToTexture

public void bindPbufferToTexture()
Overrides:
bindPbufferToTexture in interface GLContextImpl

create

protected abstract 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().

createContext

protected void createContext(boolean onscreen)
Creates and initializes an appropriate OpenGL context. Should only be called by create().

destroyImpl

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

getContext

public long getContext()

getGLDrawable

public GLDrawable getGLDrawable()
Returns the GLDrawable to which this context may be used to draw.
Overrides:
getGLDrawable in interface GLContext

getGLXExt

public GLXExt getGLXExt()

getGLXExtProcAddressTable

public GLXExtProcAddressTable getGLXExtProcAddressTable()

getOffscreenContextPixelDataType

public int getOffscreenContextPixelDataType()
Overrides:
getOffscreenContextPixelDataType in interface GLContextImpl

getOffscreenContextReadBuffer

public int getOffscreenContextReadBuffer()

getPlatformExtensionsString

public String getPlatformExtensionsString()
Overrides:
getPlatformExtensionsString in interface GLContextImpl

getPlatformGLExtensions

public Object getPlatformGLExtensions()
Overrides:
getPlatformGLExtensions in interface GLContextImpl

glAllocateMemoryNV

public ByteBuffer glAllocateMemoryNV(int arg0,
                                     float arg1,
                                     float arg2,
                                     float arg3)
Overrides:
glAllocateMemoryNV in interface GLContextImpl

isCreated

public boolean isCreated()
Overrides:
isCreated in interface GLContextImpl

isExtensionAvailable

public boolean isExtensionAvailable(String glExtensionName)
Overrides:
isExtensionAvailable in interface GLContextImpl

isFunctionAvailable

protected boolean isFunctionAvailable(String glFunctionName)
Overrides:
isFunctionAvailable in interface GLContextImpl

isOptimizable

public boolean isOptimizable()
Overrides:
isOptimizable in interface GLContextImpl

lockToolkit

protected void lockToolkit()

makeCurrentImpl

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

mapToRealGLExtensionName

protected String mapToRealGLExtensionName(String glExtensionName)
Overrides:
mapToRealGLExtensionName in interface GLContextImpl

mapToRealGLFunctionName

protected String mapToRealGLFunctionName(String glFunctionName)
Overrides:
mapToRealGLFunctionName in interface GLContextImpl

offscreenImageNeedsVerticalFlip

public boolean offscreenImageNeedsVerticalFlip()
Overrides:
offscreenImageNeedsVerticalFlip in interface GLContextImpl

releaseImpl

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

releasePbufferFromTexture

public void releasePbufferFromTexture()
Overrides:
releasePbufferFromTexture in interface GLContextImpl

resetGLFunctionAvailability

protected void resetGLFunctionAvailability()
Overrides:
resetGLFunctionAvailability in interface GLContextImpl

setSwapInterval

public void setSwapInterval(int interval)
Overrides:
setSwapInterval in interface GLContextImpl

unlockToolkit

protected void unlockToolkit()

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