Package org.lwjgl.opencl
Class CLContext
- java.lang.Object
-
- org.lwjgl.PointerWrapperAbstract
-
- org.lwjgl.opencl.CLContext
-
- All Implemented Interfaces:
PointerWrapper
public final class CLContext extends PointerWrapperAbstract
This class is a wrapper around a cl_context pointer.- Author:
- Spasi
-
-
Field Summary
-
Fields inherited from class org.lwjgl.PointerWrapperAbstract
pointer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.CLCommandQueuegetCLCommandQueue(long id)Returns a CLCommandQueue associated with this context.CLEventgetCLEvent(long id)Returns a user CLEvent associated with this context.CLMemgetCLMem(long id)Returns a CLMem associated with this context.CLProgramgetCLProgram(long id)Returns a CLProgram associated with this context.CLSamplergetCLSampler(long id)Returns a CLSampler associated with this context.List<CLDevice>getInfoDevices()Returns the list of devices in context.intgetInfoInt(int param_name)Returns the integer value of the specified parameter.PgetParent()intgetReferenceCount()List<CLImageFormat>getSupportedImageFormats(long flags, int image_type)List<CLImageFormat>getSupportedImageFormats(long flags, int image_type, Filter<CLImageFormat> filter)booleanisValid()Returns true if this object represents a valid pointer.-
Methods inherited from class org.lwjgl.PointerWrapperAbstract
checkValid, equals, getPointer, hashCode, toString
-
-
-
-
Method Detail
-
getCLCommandQueue
public CLCommandQueue getCLCommandQueue(long id)
Returns a CLCommandQueue associated with this context.- Parameters:
id- the command queue object id- Returns:
- the CLCommandQueue object
-
getCLMem
public CLMem getCLMem(long id)
Returns a CLMem associated with this context.- Parameters:
id- the memory object id- Returns:
- the CLMem object
-
getCLSampler
public CLSampler getCLSampler(long id)
Returns a CLSampler associated with this context.- Parameters:
id- the sampler object id- Returns:
- the CLSampler object
-
getCLProgram
public CLProgram getCLProgram(long id)
Returns a CLProgram associated with this context.- Parameters:
id- the program object id- Returns:
- the CLProgram object
-
getCLEvent
public CLEvent getCLEvent(long id)
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
public List<CLDevice> getInfoDevices()
Returns the list of devices in context.- Returns:
- the list of devices
-
getSupportedImageFormats
public List<CLImageFormat> getSupportedImageFormats(long flags, int image_type)
-
getSupportedImageFormats
public List<CLImageFormat> getSupportedImageFormats(long flags, int image_type, Filter<CLImageFormat> filter)
-
getParent
public P 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
-
-