Package com.jogamp.opencl.gl
Class CLGLBuffer<B extends Buffer>
- java.lang.Object
-
- com.jogamp.opencl.CLObject
-
- com.jogamp.opencl.CLMemory<B>
-
- com.jogamp.opencl.CLBuffer<B>
-
- com.jogamp.opencl.gl.CLGLBuffer<B>
-
- All Implemented Interfaces:
AutoCloseable
,CLResource
,CLGLObject
,AutoCloseable
public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements CLGLObject
Shared buffer between OpenGL and OpenCL contexts.- Author:
- Michael Bien, et.al.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jogamp.opencl.CLMemory
CLMemory.GLObjectType, CLMemory.Map, CLMemory.Mem
-
-
Field Summary
Fields Modifier and Type Field Description int
GLID
The OpenGL object handle.-
Fields inherited from class com.jogamp.opencl.CLMemory
clCapacity, elementSize, FLAGS, size
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <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.com.jogamp.opengl.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.boolean
isReleased()
Returns true ifCLResource.release()
has been called.String
toString()
void
updateSize()
Updates the size of this CLGLBuffer by querying OpenGL.-
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, initCLCapacity, isHostPointerFlag, isReadOnly, isReadWrite, isWriteOnly, registerDestructorCallback, use
-
Methods inherited from class com.jogamp.opencl.CLObject
getID, getPlatform
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.jogamp.opencl.gl.CLGLObject
getID
-
-
-
-
Method Detail
-
updateSize
public void updateSize()
Updates the size of this CLGLBuffer by querying OpenGL. This method may only be called if this memory object has been acquired by callingCLCommandQueue.putAcquireGLObject(com.jogamp.opencl.gl.CLGLObject)
.
-
getGLObjectID
public int getGLObjectID()
Description copied from interface:CLGLObject
Returns the OpenGL object id of this shared object.- Specified by:
getGLObjectID
in interfaceCLGLObject
-
getGLObjectType
public CLMemory.GLObjectType getGLObjectType()
Description copied from interface:CLGLObject
Returns the OpenGL buffer type of this shared object.- Specified by:
getGLObjectType
in interfaceCLGLObject
-
getContext
public CLGLContext getContext()
Description copied from class:CLObject
Returns the context for this OpenCL object.- Specified by:
getContext
in interfaceCLGLObject
- Overrides:
getContext
in classCLObject
-
getGLContext
public com.jogamp.opengl.GLContext getGLContext()
Description copied from interface:CLGLObject
Returns the OpenGL context of this shared object.- Specified by:
getGLContext
in interfaceCLGLObject
-
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.
-
close
@Deprecated public final void close()
Deprecated.This method is not intended to be called from client code.Implementation detail, satisfyingAutoCloseable
. Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoCloseable
- See Also:
AutoCloseable
-
isReleased
public boolean isReleased()
Description copied from interface:CLResource
Returns true ifCLResource.release()
has been called.- Specified by:
isReleased
in interfaceCLResource
-
-