com.jogamp.opencl.gl
Class CLGLBuffer<B extends Buffer>

java.lang.Object
  extended by com.jogamp.opencl.CLMemory<B>
      extended by com.jogamp.opencl.CLBuffer<B>
          extended by com.jogamp.opencl.gl.CLGLBuffer<B>
All Implemented Interfaces:
AutoCloseable, CLResource

public final class CLGLBuffer<B extends Buffer>
extends CLBuffer<B>

Shared buffer between OpenGL and OpenCL contexts.

Author:
Michael Bien

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jogamp.opencl.CLMemory
CLMemory.GLObjectType, CLMemory.Map, CLMemory.Mem
 
Field Summary
protected  CL cl
           
protected  CLContext context
           
 int GLID
          The OpenGL object handle.
 long ID
          The OpenCL object handle.
 
Fields inherited from class com.jogamp.opencl.CLMemory
clCapacity, elementSize, FLAGS, size
 
Method Summary
<T extends Buffer>
CLGLBuffer<T>
cloneWith(T directBuffer)
          Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.
 void close()
          Deprecated. This method is not intended to be called from client code.
 CLGLContext getContext()
          Returns the context for this OpenCL object.
 GLContext getGLContext()
          Returns the OpenGL context of this shared object.
 int getGLObjectID()
          Returns the OpenGL object id of this shared object.
 CLMemory.GLObjectType getGLObjectType()
          Returns the OpenGL buffer type of this shared object.
 long getID()
          Returns the OpenCL object handle
 CLPlatform getPlatform()
          Returns the platform for this OpenCL object.
 String toString()
           
 
Methods inherited from class com.jogamp.opencl.CLBuffer
createSubBuffer, getSubBuffers, isSubBuffer, release
 
Methods inherited from class com.jogamp.opencl.CLMemory
equals, getBuffer, getCL, getCLCapacity, getCLSize, getConfig, getElementSize, getMapCount, getNIOCapacity, getNIOSize, getSizeImpl, hashCode, isHostPointerFlag, isReadOnly, isReadWrite, isWriteOnly, registerDestructorCallback, use
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GLID

public final int GLID
The OpenGL object handle.


ID

public final long ID
The OpenCL object handle.


context

protected CLContext context

cl

protected final CL cl
Method Detail

getGLObjectID

public int getGLObjectID()
Returns the OpenGL object id of this shared object.


getGLObjectType

public CLMemory.GLObjectType getGLObjectType()
Returns the OpenGL buffer type of this shared object.


getContext

public CLGLContext getContext()
Returns the context for this OpenCL object.


getGLContext

public GLContext getGLContext()
Returns the OpenGL context of this shared object.


cloneWith

public <T extends Buffer> CLGLBuffer<T> cloneWith(T directBuffer)
Description copied from class: CLMemory
Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.

Overrides:
cloneWith in class CLBuffer<B extends Buffer>

toString

public String toString()
Overrides:
toString in class CLMemory<B extends Buffer>

close

@Deprecated
public final void close()
Deprecated. This method is not intended to be called from client code.

Implementation detail. TODO remove as soon we have extension methods.

Specified by:
close in interface AutoCloseable
See Also:
AutoCloseable

getPlatform

public CLPlatform getPlatform()
Returns the platform for this OpenCL object.


getID

public long getID()
Returns the OpenCL object handle