JOCL v2.6.0-rc-20250722
JOCL, OpenCL® API Binding for Java™ (public API).
com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer > Class Template Reference

Shared buffer between OpenGL and OpenCL contexts. More...

Inheritance diagram for com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >:
Collaboration diagram for com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >:

Public Member Functions

void updateSize ()
 Updates the size of this CLGLBuffer by querying OpenGL. More...
 
int getGLObjectID ()
 Returns the OpenGL object id of this shared object. More...
 
GLObjectType getGLObjectType ()
 Returns the OpenGL buffer type of this shared object. More...
 
CLGLContext getContext ()
 Returns the OpenCL context of this shared object. More...
 
GLContext getGLContext ()
 Returns the OpenGL context of this shared object. More...
 
String toString ()
 
- Public Member Functions inherited from com.jogamp.opencl.CLBuffer< B extends Buffer >
CLSubBuffer< B > createSubBuffer (int offset, int size, final Mem... flags)
 Creates a sub buffer with the specified region from this buffer. More...
 
void release ()
 
List< CLSubBuffer< B > > getSubBuffers ()
 Returns the list of subbuffers. More...
 
boolean isSubBuffer ()
 Returns true if this is a sub buffer. More...
 
- Public Member Functions inherited from com.jogamp.opencl.CLMemory< B >
void registerDestructorCallback (final CLMemObjectListener listener)
 Registers a callback which will be called by the OpenCL implementation when the memory object is released. More...
 
abstract< T extends Buffer > CLMemory< T > cloneWith (T directBuffer)
 Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer. More...
 
CLMemory< B > use (final B buffer)
 
getBuffer ()
 Returns the optional NIO buffer for this memory object. More...
 
int getNIOCapacity ()
 Returns the capacity of the wrapped direct buffer or 0 if no buffer available. More...
 
int getNIOSize ()
 Returns the size of the wrapped direct buffer in byte or 0 if no buffer available. More...
 
long getCLSize ()
 Returns the size of the allocated OpenCL memory in bytes. More...
 
int getCLCapacity ()
 Returns the size in buffer elements of this memory object. More...
 
int getElementSize ()
 Returns the size in bytes of a single buffer element. More...
 
EnumSet< MemgetConfig ()
 Returns the configuration of this memory object. More...
 
int getMapCount ()
 Returns the number of buffer mappings. More...
 
boolean isReadOnly ()
 Returns true if this memory object was created with the Mem#READ_ONLY flag. More...
 
boolean isWriteOnly ()
 Returns true if this memory object was created with the Mem#WRITE_ONLY flag. More...
 
boolean isReadWrite ()
 Returns true if this memory object was created with the Mem#READ_WRITE flag. More...
 
void release ()
 Releases the OpenCL resource. More...
 
boolean equals (final Object obj)
 Returns the OpenGL buffer type of this shared buffer. More...
 
int hashCode ()
 
String toString ()
 
- Public Member Functions inherited from com.jogamp.opencl.gl.CLGLObject
int getGLObjectID ()
 Returns the OpenGL object id of this shared object. More...
 
long getID ()
 Returns the OpenCL object handle. More...
 
GLObjectType getGLObjectType ()
 Returns the OpenGL buffer type of this shared object. More...
 
CLGLContext getContext ()
 Returns the OpenCL context of this shared object. More...
 
GLContext getGLContext ()
 Returns the OpenGL context of this shared object. More...
 

Public Attributes

final int GLID
 The OpenGL object handle. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com.jogamp.opencl.CLBuffer< B extends Buffer >
 CLBuffer (final CLContext context, final long size, final long id, final int flags)
 
 CLBuffer (final CLContext context, final B directBuffer, final long size, final long id, final int flags)
 
- Protected Member Functions inherited from com.jogamp.opencl.CLMemory< B >
 CLMemory (final CLContext context, final B directBuffer, final long size, final long id, final int flags)
 
final void initCLCapacity ()
 
- Static Protected Member Functions inherited from com.jogamp.opencl.CLMemory< B >
static boolean isHostPointerFlag (final int flags)
 Returns true if a host pointer must be specified on mem object creation. More...
 
static long getSizeImpl (final CLContext context, final long id)
 
static CL getCL (final CLContext context)
 
- Protected Attributes inherited from com.jogamp.opencl.CLMemory< B >
final int FLAGS
 
long size
 
int elementSize
 
int clCapacity
 

Detailed Description

Shared buffer between OpenGL and OpenCL contexts.

Author
Michael Bien, et.al.

Definition at line 45 of file CLGLBuffer.java.

Member Function Documentation

◆ getContext()

CLGLContext com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.getContext ( )

Returns the OpenCL context of this shared object.

Implements com.jogamp.opencl.gl.CLGLObject.

Definition at line 100 of file CLGLBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGLContext()

GLContext com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.getGLContext ( )

Returns the OpenGL context of this shared object.

Implements com.jogamp.opencl.gl.CLGLObject.

Definition at line 105 of file CLGLBuffer.java.

Here is the call graph for this function:

◆ getGLObjectID()

int com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.getGLObjectID ( )

Returns the OpenGL object id of this shared object.

Implements com.jogamp.opencl.gl.CLGLObject.

Definition at line 90 of file CLGLBuffer.java.

◆ getGLObjectType()

GLObjectType com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.getGLObjectType ( )

Returns the OpenGL buffer type of this shared object.

Implements com.jogamp.opencl.gl.CLGLObject.

Definition at line 95 of file CLGLBuffer.java.

◆ toString()

String com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.toString ( )

Definition at line 115 of file CLGLBuffer.java.

◆ updateSize()

void com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.updateSize ( )

Updates the size of this CLGLBuffer by querying OpenGL.

This method may only be called if this memory object has been acquired by calling CLCommandQueue#putAcquireGLObject(com.jogamp.opencl.gl.CLGLObject).

Definition at line 84 of file CLGLBuffer.java.

Here is the call graph for this function:

Member Data Documentation

◆ GLID

final int com.jogamp.opencl.gl.CLGLBuffer< B extends Buffer >.GLID

The OpenGL object handle.

Definition at line 51 of file CLGLBuffer.java.


The documentation for this class was generated from the following file: