 |
My Project
|
Go to the documentation of this file.
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.
~CpuGLVertexBuffer()
Destructor.
bool allocate()
Allocates VBO for this buffer. Returns true if success.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
GLuint BindVBO(void *deviceContext=NULL)
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.
Concrete vertex buffer class for cpu subdivision and OpenGL drawing.