|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lwjgl.opengl.SharedDrawable
public final class SharedDrawable
A Drawable implementation that shares its context with another Drawable. This is useful for background loading of resources. See org.lwjgl.test.opengl.multithread.BackgroundLoad for an example.
Field Summary | |
---|---|
protected org.lwjgl.opengl.Context |
context
The OpenGL Context. |
protected org.lwjgl.opengl.PeerInfo |
peer_info
Handle to the native GL rendering context |
Constructor Summary | |
---|---|
SharedDrawable(Drawable drawable)
|
Method Summary | |
---|---|
protected void |
checkDestroyed()
|
org.lwjgl.opengl.Context |
createSharedContext()
[INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context. |
void |
destroy()
Destroys the Drawable. |
org.lwjgl.opengl.Context |
getContext()
[INTERNAL USE ONLY] Returns the Drawable's Context. |
boolean |
isCurrent()
Returns true if the Drawable's context is current in the current thread. |
void |
makeCurrent()
Makes the Drawable's context current in the current thread. |
void |
releaseContext()
If the Drawable's context is current in the current thread, no context will be current after a call to this method. |
void |
setCLSharingProperties(PointerBuffer properties)
Sets the appropriate khr_gl_sharing properties in the target PointerBuffer ,
so that if it is used in a clCreateContext(FromType) call, the created CL
context will be sharing objects with this Drawable 's GL context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.lwjgl.opengl.PeerInfo peer_info
protected org.lwjgl.opengl.Context context
Constructor Detail |
---|
public SharedDrawable(Drawable drawable) throws LWJGLException
LWJGLException
Method Detail |
---|
public org.lwjgl.opengl.Context createSharedContext()
public org.lwjgl.opengl.Context getContext()
public boolean isCurrent() throws LWJGLException
Drawable
LWJGLException
public void makeCurrent() throws LWJGLException
Drawable
LWJGLException
public void releaseContext() throws LWJGLException
Drawable
LWJGLException
public void destroy()
Drawable
public void setCLSharingProperties(PointerBuffer properties) throws LWJGLException
Drawable
PointerBuffer
,
so that if it is used in a clCreateContext(FromType)
call, the created CL
context will be sharing objects with this Drawable
's GL context. After a
call to this method, the target buffer position will have advanced by 2 to 4 positions,
depending on the implementation.
properties
- The target properties buffer. It must have at least 4 positions remaining.
LWJGLException
protected final void checkDestroyed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |