Class CLContext

    • 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 use
        devices - the devices to use
        errcode_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 use
        devices - the devices to use
        pfn_notify - the context callback function
        errcode_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 use
        devices - the devices to use
        share_drawable - the OpenGL drawable to share objects with
        errcode_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 use
        device_type - the device type to use
        errcode_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 use
        device_type - the device type to use
        pfn_notify - the context callback function
        errcode_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 use
        device_type - the device type to use
        share_drawable - the OpenGL drawable to share objects with
        errcode_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)
      • getParent

        public P getParent()
      • getReferenceCount

        public final int getReferenceCount()
      • isValid

        public final boolean isValid()
        Description copied from class: PointerWrapperAbstract
        Returns 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:
        isValid in class PointerWrapperAbstract
        Returns:
        true if the pointer is valid