Top Description Fields Constructors Methods
com.jogamp.opencl.gl

public final Class CLGLBuffer<B extends Buffer>

extends CLBuffer<B extends Buffer>
implements CLGLObject
Class Inheritance
All Implemented Interfaces
com.jogamp.opencl.gl.CLGLObject
Imports
com.jogamp.opencl.CLBuffer, .CLCommandQueue, .CLContext, .CLException, com.jogamp.opencl.llb.gl.CLGL, java.nio.Buffer, com.jogamp.opengl.GLContext

Shared buffer between OpenGL and OpenCL contexts.
Author
Michael Bien, et.al.

Field Summary

Modifier and TypeField and Description
public final int
GLID

The OpenGL object handle.

Constructor Summary

AccessConstructor and Description
private
CLGLBuffer(final CLContext context, final B directBuffer, final long id, final int glObject, final long size, final int flags)

Method Summary

Modifier and TypeMethod and Description
pack-priv static <B extends Buffer> void
checkBuffer(final B directBuffer, final int flags)

public <T extends Buffer> CLGLBuffer<T>
cloneWith(final T directBuffer)

Overrides com.jogamp.opencl.CLBuffer.cloneWith.

Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.
pack-priv static <B extends Buffer> CLGLBuffer<B>
create(final CLContext context, final B directBuffer, final long size, final int flags, final int glBuffer)

public CLGLContext
getContext()

Overrides com.jogamp.opencl.CLObject.getContext.

Implements com.jogamp.opencl.gl.CLGLObject.getContext.

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

Implements com.jogamp.opencl.gl.CLGLObject.getGLContext.

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

Implements com.jogamp.opencl.gl.CLGLObject.getGLObjectID.

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

Implements com.jogamp.opencl.gl.CLGLObject.getGLObjectType.

Returns the OpenGL buffer type of this shared object.
public String
toString()

Overrides com.jogamp.opencl.CLMemory.toString.

Returns a string representation of the object.
public void
updateSize()

Updates the size of this CLGLBuffer by querying OpenGL.

Inherited from com.jogamp.opencl.CLBuffer:
createSubBuffergetSubBuffersisSubBufferrelease

Field Detail

GLIDback to summary
public final int GLID

The OpenGL object handle.

Constructor Detail

CLGLBufferback to summary
private CLGLBuffer(final CLContext context, final B directBuffer, final long id, final int glObject, final long size, final int flags)

Method Detail

checkBufferback to summary
pack-priv static <B extends Buffer> void checkBuffer(final B directBuffer, final int flags) throws IllegalArgumentException
cloneWithback to summary
public <T extends Buffer> CLGLBuffer<T> cloneWith(final T directBuffer)

Overrides com.jogamp.opencl.CLBuffer.cloneWith.

Doc from com.jogamp.opencl.CLMemory.cloneWith.

Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.

Annotations
@Override
createback to summary
pack-priv static <B extends Buffer> CLGLBuffer<B> create(final CLContext context, final B directBuffer, final long size, final int flags, final int glBuffer)
getContextback to summary
public CLGLContext getContext()

Overrides com.jogamp.opencl.CLObject.getContext.

Implements com.jogamp.opencl.gl.CLGLObject.getContext.

Doc from com.jogamp.opencl.gl.CLGLObject.getContext.

Returns the OpenCL context of this shared object.

Annotations
@Override
getGLContextback to summary
public GLContext getGLContext()

Implements com.jogamp.opencl.gl.CLGLObject.getGLContext.

Doc from com.jogamp.opencl.gl.CLGLObject.getGLContext.

Returns the OpenGL context of this shared object.

Annotations
@Override
getGLObjectIDback to summary
public int getGLObjectID()

Implements com.jogamp.opencl.gl.CLGLObject.getGLObjectID.

Doc from com.jogamp.opencl.gl.CLGLObject.getGLObjectID.

Returns the OpenGL object id of this shared object.

Annotations
@Override
getGLObjectTypeback to summary
public CLMemory.GLObjectType getGLObjectType()

Implements com.jogamp.opencl.gl.CLGLObject.getGLObjectType.

Doc from com.jogamp.opencl.gl.CLGLObject.getGLObjectType.

Returns the OpenGL buffer type of this shared object.

Annotations
@Override
toStringback to summary
public String toString()

Overrides com.jogamp.opencl.CLMemory.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
updateSizeback to summary
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 calling CLCommandQueue#putAcquireGLObject(com.jogamp.opencl.gl.CLGLObject).