25 #ifndef OSD_CL_VERTEX_BUFFER_H
26 #define OSD_CL_VERTEX_BUFFER_H
28 #include "../version.h"
29 #include "../osd/opencl.h"
31 namespace OpenSubdiv {
32 namespace OPENSUBDIV_VERSION {
53 void UpdateData(
const float *src,
int startVertex,
int numVertices, cl_command_queue clQueue);
66 CLVertexBuffer(
int numElements,
int numVertices, cl_context clContext);
81 using namespace OPENSUBDIV_VERSION;
85 #endif // OSD_CL_VERTEX_BUFFER_H
bool allocate(cl_context clContext)
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
~CLVertexBuffer()
Destructor.
Concrete vertex buffer class for OpenCL subvision.
cl_mem BindCLBuffer(cl_command_queue queue)
Returns the CL memory object.
CLVertexBuffer(int numElements, int numVertices, cl_context clContext)
Constructor.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
void UpdateData(const float *src, int startVertex, int numVertices, cl_command_queue clQueue)
static CLVertexBuffer * Create(int numElements, int numVertices, cl_context clContext)
Creator. Returns NULL if error.