25 #ifndef OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
26 #define OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
28 #include "../version.h"
31 #include "../osd/opengl.h"
33 namespace OpenSubdiv {
34 namespace OPENSUBDIV_VERSION {
51 void *deviceContext = NULL);
58 void UpdateData(
const float *src,
int startVertex,
int numVertices,
59 void *deviceContext = NULL);
73 GLuint
BindVBO(
void *deviceContext = NULL);
93 using namespace OPENSUBDIV_VERSION;
97 #endif // OPENSUBDIV3_OSD_CPU_GL_VERTEX_BUFFER_H
~CpuGLVertexBuffer()
Destructor.
CpuGLVertexBuffer(int numElements, int numVertices)
Constructor.
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
static CpuGLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
GLuint BindVBO(void *deviceContext=NULL)
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
Concrete vertex buffer class for cpu subdivision and OpenGL drawing.
bool allocate()
Allocates VBO for this buffer. Returns true if success.