Package org.lwjgl.opengl
Interface Drawable
-
- All Known Implementing Classes:
AWTGLCanvas,Pbuffer,SharedDrawable
public interface DrawableThe Drawable interface describes an OpenGL drawable with an associated Context.- Author:
- elias_naur
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Destroys the Drawable.booleanisCurrent()Returns true if the Drawable's context is current in the current thread.voidmakeCurrent()Makes the Drawable's context current in the current thread.voidreleaseContext()If the Drawable's context is current in the current thread, no context will be current after a call to this method.voidsetCLSharingProperties(PointerBuffer properties)Sets the appropriate khr_gl_sharing properties in the targetPointerBuffer, so that if it is used in aclCreateContext(FromType)call, the created CL context will be sharing objects with thisDrawable's GL context.
-
-
-
Method Detail
-
isCurrent
boolean isCurrent() throws LWJGLExceptionReturns true if the Drawable's context is current in the current thread.- Throws:
LWJGLException
-
makeCurrent
void makeCurrent() throws LWJGLExceptionMakes the Drawable's context current in the current thread.- Throws:
LWJGLException
-
releaseContext
void releaseContext() throws LWJGLExceptionIf the Drawable's context is current in the current thread, no context will be current after a call to this method.- Throws:
LWJGLException
-
destroy
void destroy()
Destroys the Drawable.
-
setCLSharingProperties
void setCLSharingProperties(PointerBuffer properties) throws LWJGLException
Sets the appropriate khr_gl_sharing properties in the targetPointerBuffer, so that if it is used in aclCreateContext(FromType)call, the created CL context will be sharing objects with thisDrawable'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.- Parameters:
properties- The target properties buffer. It must have at least 4 positions remaining.- Throws:
LWJGLException
-
-