Added basic object wrapper for VAOs
This commit is contained in:
parent
c3e49cd78e
commit
8921957161
7 changed files with 162 additions and 17 deletions
|
@ -22,9 +22,17 @@ namespace oglu
|
|||
Object(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
|
||||
|
||||
GLuint GetVAO() { return VAO; }
|
||||
void Bind();
|
||||
void Unbind();
|
||||
|
||||
void Draw();
|
||||
void BindAndDraw();
|
||||
|
||||
private:
|
||||
inline void RegisterVertexAttribPointer(GLuint index, const VertexAttribute& topology);
|
||||
|
||||
GLuint VAO;
|
||||
GLsizei count;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue