Package org.lwjgl.opencl
Class CLContext
java.lang.Object
org.lwjgl.PointerWrapperAbstract
org.lwjgl.opencl.CLContext
- All Implemented Interfaces:
PointerWrapper
This class is a wrapper around a cl_context pointer.
- Author:
- Spasi
-
Field Summary
Fields inherited from class org.lwjgl.PointerWrapperAbstract
pointer -
Method Summary
Modifier and TypeMethodDescriptionstatic CLContextcreate(CLPlatform platform, List<CLDevice> devices, IntBuffer errcode_ret) Creates a new CLContext.static CLContextcreate(CLPlatform platform, List<CLDevice> devices, CLContextCallback pfn_notify, IntBuffer errcode_ret) Creates a new CLContext.static CLContextcreate(CLPlatform platform, List<CLDevice> devices, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) Creates a new CLContext.static CLContextcreateFromType(CLPlatform platform, long device_type, IntBuffer errcode_ret) Creates a new CLContext.static CLContextcreateFromType(CLPlatform platform, long device_type, CLContextCallback pfn_notify, IntBuffer errcode_ret) Creates a new CLContext.static CLContextcreateFromType(CLPlatform platform, long device_type, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) Creates a new CLContext.getCLCommandQueue(long id) Returns a CLCommandQueue associated with this context.getCLEvent(long id) Returns a user CLEvent associated with this context.getCLMem(long id) Returns a CLMem associated with this context.getCLProgram(long id) Returns a CLProgram associated with this context.getCLSampler(long id) Returns a CLSampler associated with this context.Returns the list of devices in context.intgetInfoInt(int param_name) Returns the integer value of the specified parameter.final intgetSupportedImageFormats(long flags, int image_type) getSupportedImageFormats(long flags, int image_type, Filter<CLImageFormat> filter) final booleanisValid()Returns true if this object represents a valid pointer.Methods inherited from class org.lwjgl.PointerWrapperAbstract
checkValid, equals, getPointer, hashCode, toString
-
Method Details
-
getCLCommandQueue
Returns a CLCommandQueue associated with this context.- Parameters:
id- the command queue object id- Returns:
- the CLCommandQueue object
-
getCLMem
Returns a CLMem associated with this context.- Parameters:
id- the memory object id- Returns:
- the CLMem object
-
getCLSampler
Returns a CLSampler associated with this context.- Parameters:
id- the sampler object id- Returns:
- the CLSampler object
-
getCLProgram
Returns a CLProgram associated with this context.- Parameters:
id- the program object id- Returns:
- the CLProgram object
-
getCLEvent
Returns a user CLEvent associated with this context.- Parameters:
id- the event object id- Returns:
- the CLEvent object
-
create
public static CLContext create(CLPlatform platform, List<CLDevice> devices, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevices- the devices to useerrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
create
public static CLContext create(CLPlatform platform, List<CLDevice> devices, CLContextCallback pfn_notify, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevices- the devices to usepfn_notify- the context callback functionerrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
create
public static CLContext create(CLPlatform platform, List<CLDevice> devices, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevices- the devices to useshare_drawable- the OpenGL drawable to share objects witherrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
createFromType
public static CLContext createFromType(CLPlatform platform, long device_type, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevice_type- the device type to useerrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
createFromType
public static CLContext createFromType(CLPlatform platform, long device_type, CLContextCallback pfn_notify, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevice_type- the device type to usepfn_notify- the context callback functionerrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
createFromType
public static CLContext createFromType(CLPlatform platform, long device_type, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) throws LWJGLException Creates a new CLContext.- Parameters:
platform- the platform to usedevice_type- the device type to useshare_drawable- the OpenGL drawable to share objects witherrcode_ret- the error code result- Returns:
- the new CLContext
- Throws:
LWJGLException- if an exception occurs while creating the context
-
getInfoInt
public int getInfoInt(int param_name) Returns the integer value of the specified parameter.- Parameters:
param_name- the parameter- Returns:
- the parameter value
-
getInfoDevices
Returns the list of devices in context.- Returns:
- the list of devices
-
getSupportedImageFormats
-
getSupportedImageFormats
public List<CLImageFormat> getSupportedImageFormats(long flags, int image_type, Filter<CLImageFormat> filter) -
getParent
-
getReferenceCount
public final int getReferenceCount() -
isValid
public final boolean isValid()Description copied from class:PointerWrapperAbstractReturns true if this object represents a valid pointer. The pointer might be invalid because it is NULL or because some other action has deleted the object that this pointer represents.- Overrides:
isValidin classPointerWrapperAbstract- Returns:
- true if the pointer is valid
-