Represents an OpenCL buffer. More...
Public Member Functions | |
ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count) | |
Creates a new ComputeBuffer . | |
ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, long count, IntPtr dataPtr) | |
Creates a new ComputeBuffer . | |
ComputeBuffer (ComputeContext context, ComputeMemoryFlags flags, T[] data) | |
Creates a new ComputeBuffer . | |
override string | ToString () |
Gets the string representation of the ComputeBuffer . | |
Static Public Member Functions | |
static ComputeBuffer< T > | CreateFromGLBuffer< T > (ComputeContext context, ComputeMemoryFlags flags, int bufferId) |
Creates a new ComputeBuffer from an existing OpenGL buffer object. | |
Properties | |
long | Count [get] |
Gets the number of elements in the ComputeBuffer . |
Represents an OpenCL buffer.
T | The type of the elements of the ComputeBuffer . |
A memory object that stores a linear collection of bytes. Buffer objects are accessible using a pointer in a kernel executing on a device.
T | : | struct |
Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, | |
ComputeMemoryFlags | flags, | |||
long | count | |||
) |
Creates a new ComputeBuffer
.
context | A ComputeContext used to create the ComputeBuffer . | |
flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer . | |
count | The number of elements of the ComputeBuffer . |
Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, | |
ComputeMemoryFlags | flags, | |||
long | count, | |||
IntPtr | dataPtr | |||
) |
Creates a new ComputeBuffer
.
context | A ComputeContext used to create the ComputeBuffer . | |
flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer . | |
count | The number of elements of the ComputeBuffer . | |
dataPtr | A pointer to the data for the ComputeBuffer . |
Cloo.ComputeBuffer< T >.ComputeBuffer | ( | ComputeContext | context, | |
ComputeMemoryFlags | flags, | |||
T[] | data | |||
) |
Creates a new ComputeBuffer
.
context | A ComputeContext used to create the ComputeBuffer . | |
flags | A bit-field that is used to specify allocation and usage information about the ComputeBuffer . | |
data | The data for the ComputeBuffer . |
static ComputeBuffer<T> Cloo.ComputeBuffer< T >.CreateFromGLBuffer< T > | ( | ComputeContext | context, | |
ComputeMemoryFlags | flags, | |||
int | bufferId | |||
) | [static] |
Creates a new ComputeBuffer
from an existing OpenGL buffer object.
T | The type of the elements of the ComputeBuffer . It is recommended, though not required, that T matches the type of the elements in the OpenGL buffer. |
context | A ComputeContext with enabled CL/GL sharing. | |
flags | A bit-field that is used to specify usage information about the ComputeBuffer . Only ComputeMemoryFlags.ReadOnly , ComputeMemoryFlags.WriteOnly and ComputeMemoryFlags.ReadWrite are allowed. | |
bufferId | The OpenGL buffer object id to use for the creation of the ComputeBuffer . |
ComputeBuffer
. T | : | struct |
override string Cloo.ComputeBuffer< T >.ToString | ( | ) |
Gets the string representation of the ComputeBuffer
.
ComputeBuffer
. Reimplemented from Cloo.ComputeObject.
long Cloo.ComputeBuffer< T >.Count [get] |
Gets the number of elements in the ComputeBuffer
.