25 #ifndef OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
26 #define OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
28 #include "../version.h"
30 #include "../osd/opengl.h"
33 namespace OpenSubdiv {
34 namespace OPENSUBDIV_VERSION {
48 void *deviceContext = NULL);
55 void UpdateData(
const float *src,
int startVertex,
int numVertices,
56 void *deviceContext = NULL);
65 GLuint
BindVBO(
void *deviceContext = NULL);
84 using namespace OPENSUBDIV_VERSION;
88 #endif // OPENSUBDIV3_OSD_GL_VERTEX_BUFFER_H
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
GLVertexBuffer(int numElements, int numVertices)
Constructor.
static GLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
GLuint BindVBO(void *deviceContext=NULL)
Returns the GL buffer object.
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
~GLVertexBuffer()
Destructor.