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"
34namespace 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);
84using namespace OPENSUBDIV_VERSION;
Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.
~GLVertexBuffer()
Destructor.
GLuint BindVBO(void *deviceContext=NULL)
Returns the GL buffer object.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
GLVertexBuffer(int numElements, int numVertices)
Constructor.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
static GLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.