Class CLGLContext

    • Method Detail

      • create

        public static CLGLContext create​(com.jogamp.opengl.GLContext glContext)
        Creates a shared context on all available devices (CL_DEVICE_TYPE_ALL).
        See Also:
        GLContext.makeCurrent()
      • create

        public static CLGLContext create​(com.jogamp.opengl.GLContext glContext,
                                         CLPlatform platform)
        Creates a shared context on the specified platform on all available devices (CL_DEVICE_TYPE_ALL).
        See Also:
        GLContext.makeCurrent()
      • create

        public static CLGLContext create​(com.jogamp.opengl.GLContext glContext,
                                         CLDevice.Type... deviceTypes)
        Creates a shared context on the specified platform and with the specified device types.
        See Also:
        GLContext.makeCurrent()
      • create

        public static CLGLContext create​(com.jogamp.opengl.GLContext glContext,
                                         CLPlatform platform,
                                         CLDevice.Type... deviceTypes)
        Creates a shared context on the specified platform and with the specified device types.
        See Also:
        GLContext.makeCurrent()
      • create

        public static CLGLContext create​(com.jogamp.opengl.GLContext glContext,
                                         CLDevice... devices)
        Creates a shared context on the specified platform and with the specified devices.
        See Also:
        GLContext.makeCurrent()
      • createFromGLBuffer

        public final CLGLBuffer<?> createFromGLBuffer​(int glBuffer,
                                                      long glBufferSize,
                                                      CLMemory.Mem... flags)
        Creates a CLGLBuffer for memory sharing with the specified OpenGL buffer.
        Parameters:
        glBuffer - The OpenGL buffer handle like a vertex buffer or pixel buffer object.
        glBufferSize - The size of the OpenGL buffer in bytes
        flags - optional flags.
      • createFromGLBuffer

        public final CLGLBuffer<?> createFromGLBuffer​(int glBuffer,
                                                      long glBufferSize,
                                                      int flags)
        Creates a CLGLBuffer for memory sharing with the specified OpenGL buffer.
        Parameters:
        glBuffer - The OpenGL buffer handle like a vertex buffer or pixel buffer object.
        glBufferSize - The size of the OpenGL buffer in bytes
        flags - optional flags.
      • createFromGLBuffer

        public final <B extends BufferCLGLBuffer<B> createFromGLBuffer​(B directBuffer,
                                                                         int glBuffer,
                                                                         long glBufferSize,
                                                                         CLMemory.Mem... flags)
        Creates a CLGLBuffer for memory sharing with the specified OpenGL buffer.
        Parameters:
        directBuffer - A direct allocated NIO buffer for data transfers between java and OpenCL.
        glBuffer - The OpenGL buffer handle like a vertex buffer or pixel buffer object.
        glBufferSize - The size of the OpenGL buffer in bytes
        flags - optional flags.
      • createFromGLBuffer

        public final <B extends BufferCLGLBuffer<B> createFromGLBuffer​(B directBuffer,
                                                                         int glBuffer,
                                                                         long glBufferSize,
                                                                         int flags)
        Creates a CLGLBuffer for memory sharing with the specified OpenGL buffer.
        Parameters:
        directBuffer - A direct allocated NIO buffer for data transfers between java and OpenCL.
        glBuffer - The OpenGL buffer handle like a vertex buffer or pixel buffer object.
        glBufferSize - The size of the OpenGL buffer in bytes
        flags - optional flags.
      • createFromGLRenderbuffer

        public final CLGLImage2d<?> createFromGLRenderbuffer​(int glBuffer,
                                                             CLMemory.Mem... flags)
      • createFromGLRenderbuffer

        public final CLGLImage2d<?> createFromGLRenderbuffer​(int glBuffer,
                                                             int flags)
      • createFromGLRenderbuffer

        public final <B extends BufferCLGLImage2d<B> createFromGLRenderbuffer​(B directBuffer,
                                                                                int glBuffer,
                                                                                CLMemory.Mem... flags)
      • createFromGLRenderbuffer

        public final <B extends BufferCLGLImage2d<B> createFromGLRenderbuffer​(B directBuffer,
                                                                                int glBuffer,
                                                                                int flags)
      • createFromGLTexture2d

        public final CLGLTexture2d<?> createFromGLTexture2d​(int target,
                                                            int texture,
                                                            int mipmap,
                                                            CLMemory.Mem... flags)
      • createFromGLTexture2d

        public final CLGLTexture2d<?> createFromGLTexture2d​(int target,
                                                            int texture,
                                                            int mipmap,
                                                            int flags)
      • createFromGLTexture2d

        public final <B extends BufferCLGLTexture2d<B> createFromGLTexture2d​(B directBuffer,
                                                                               int target,
                                                                               int texture,
                                                                               int mipmap,
                                                                               CLMemory.Mem... flags)
      • createFromGLTexture2d

        public final <B extends BufferCLGLTexture2d<B> createFromGLTexture2d​(B directBuffer,
                                                                               int target,
                                                                               int texture,
                                                                               int mipmap,
                                                                               int flags)
      • createFromGLTexture3d

        public final CLGLTexture3d<?> createFromGLTexture3d​(int target,
                                                            int texture,
                                                            int mipmap,
                                                            CLMemory.Mem... flags)
      • createFromGLTexture3d

        public final CLGLTexture3d<?> createFromGLTexture3d​(int target,
                                                            int texture,
                                                            int mipmap,
                                                            int flags)
      • createFromGLTexture3d

        public final <B extends BufferCLGLTexture3d<B> createFromGLTexture3d​(B directBuffer,
                                                                               int target,
                                                                               int texture,
                                                                               int mipmap,
                                                                               CLMemory.Mem... flags)
      • createFromGLTexture3d

        public final <B extends BufferCLGLTexture3d<B> createFromGLTexture3d​(B directBuffer,
                                                                               int target,
                                                                               int texture,
                                                                               int mipmap,
                                                                               int flags)
      • getCL

        public CL getCL()
        Return the low level OpenCL interface with OpenGL interoperability.
        Overrides:
        getCL in class CLContext
      • getGLContext

        public com.jogamp.opengl.GLContext getGLContext()
        Returns the OpenGL context this context was shared with.
      • close

        @Deprecated
        public final void close()
        Deprecated.
        This method is not intended to be called from client code.
        Implementation detail, satisfying AutoCloseable. Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface AutoCloseable
        See Also:
        AutoCloseable