28 #include <OpenCLFramework/clfOpenCL.hh>
29 #include <OpenCLFramework/clfMemory.hh>
30 #include <OpenGLFramework/Base/glfVertexBuffer.hh>
58 void Allocate(
unsigned int bufsize,
bool readonly=
false,
bool writeonly=
false,
void *hostptr = NULL,
bool copy =
false);
59 void Allocate(
unsigned int rows,
unsigned int cols,
unsigned int channels,
unsigned int itemsize,
bool readonly=
false,
bool writeonly=
false,
void *hostptr = NULL,
bool copy =
false);
60 void SetCached(
bool cache);
72 void WriteToBuffer(
const void *data,
unsigned int offset = 0,
unsigned int size = 0);
80 void ReadFromBuffer(
void *data,
unsigned int offset = 0,
unsigned int size = 0);
87 void CopyBuffer(
clfBuffer &outputbuffer,
unsigned int srcoffset = 0,
unsigned int dstoffset = 0,
unsigned int size = 0);
89 void* MapBuffer(
bool write =
false,
unsigned int offset = 0,
unsigned int size = 0);
91 unsigned int GetRows()
const;
92 unsigned int GetCols()
const;
93 unsigned int GetChannels()
const;
94 unsigned int GetItemSize()
const;
95 unsigned int GetStride()
const;
98 clfBuffer(cl::Context *context, cl::CommandQueue *queue_);
105 unsigned int rows_, cols_, channels_, itemsize_, stride_;
A vertex buffer contains an array of vertices that can be used for rendering.