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" 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(int numElements, int numVertices)
Constructor.
static CpuGLVertexBuffer * Create(int numElements, int numVertices, void *deviceContext=NULL)
Creator. Returns NULL if error.
int GetNumVertices() const
Returns how many vertices allocated 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.
void UpdateData(const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
~CpuGLVertexBuffer()
Destructor.
GLuint BindVBO(void *deviceContext=NULL)