|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hermetica.magician.GLContext
This class encapsulates an OpenGL rendering context. This object is associated with a drawing surface, beit and X Widget or Win32 HDC which funnels all OpenGL calls onto that surface. Each rendering context has a set of ``capabilities'' associated with it which are used to select the most apt device context to render onto. After the context successfully acquires a device to render to, the capabilities may not be changed.
GLComponent
,
GLCapabilities
Field Summary | |
static java.lang.String |
VERSION
Version information |
Constructor Summary | |
GLContext()
Default context constructor. |
|
GLContext(boolean mode)
Context constructor with the locking trace level specified. |
|
GLContext(GLCapabilities capabilities)
Context constructor using a previously prepared set of capabilities. |
|
GLContext(GLCapabilities capabilities,
boolean mode)
Context constructor with the locking trace level specified as well as a non-default set of context capabilities. |
Method Summary | |
boolean |
createContext(GLDrawable component)
Checks to see whether or not a context is created |
void |
destroy()
Destroys the context and frees any resources associated with it. |
void |
destroyContext()
Deprecated. This method has been deprecated in favour of ``destroy()''. It will be removed as of beta 4 or a final release of Magician |
GLCapabilities |
getCapabilities()
Returns the GLCapabilities object associated with this context |
GLComponent |
getComponent()
Returns the GLComponent associated with this context |
static GLContext |
getCurrentContext()
Returns the current GLContext in OpenGL, if one exists |
static boolean |
getTraceStatus()
Returns the current tracing status |
boolean |
isInitialized()
Returns the current initialization status of the context |
static void |
lock()
Locks the OpenGL context for exclusive use. |
void |
makeCurrent()
Makes this context the current one within the OpenGL state machine |
void |
setCapabilities(GLCapabilities capability)
Sets the capabilities of this context to a brand-new object. |
protected void |
setComponent(GLDrawable component)
Sets the GLComponent associated with this context |
static void |
setTraceStatus(boolean mode)
Sets the tracing level of the context lock. |
void |
swapBuffers()
Swaps the buffers of a context, if double-buffering is used |
void |
swapBuffers(GLDrawable drawable)
Swaps the buffer ( typically offscreen ) onto the given drawable |
static void |
unlock()
Releases the OpenGL context for use elsewhere. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String VERSION
Constructor Detail |
public GLContext()
GLCapabilities
public GLContext(GLCapabilities capabilities)
GLCapabilities
public GLContext(boolean mode)
mode
- Lock tracing mode.public GLContext(GLCapabilities capabilities, boolean mode)
capabilities
- The configured capabilities for this contextmode
- The context lock tracing levelMethod Detail |
public boolean isInitialized()
public static void setTraceStatus(boolean mode)
public static boolean getTraceStatus()
public static GLContext getCurrentContext()
protected void setComponent(GLDrawable component)
public GLComponent getComponent()
public boolean createContext(GLDrawable component)
public void destroyContext() throws GLContextException
component
- A GLComponent associated with this contextdestroy()
public void destroy() throws GLContextException
component
- A GLComponent associated with this contextdestroyContext()
public static final void lock()
public static final void unlock()
public void makeCurrent() throws GLContextException
public void swapBuffers() throws GLContextException
public void swapBuffers(GLDrawable drawable)
public GLCapabilities getCapabilities()
GLCapabilities
public void setCapabilities(GLCapabilities capability)
GLCapabilities
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |