rename to vertex array
parent
002f5c2ae8
commit
cec16931f2
|
@ -100,7 +100,7 @@ namespace blt::gfx
|
|||
/**
|
||||
* basic VAO class.
|
||||
*/
|
||||
class basic_vertex_array
|
||||
class vertex_array
|
||||
{
|
||||
private:
|
||||
GLuint vaoID;
|
||||
|
@ -108,15 +108,15 @@ namespace blt::gfx
|
|||
HASHSET<GLuint> used_attributes;
|
||||
vbo_t element;
|
||||
public:
|
||||
basic_vertex_array();
|
||||
vertex_array();
|
||||
|
||||
basic_vertex_array(const basic_vertex_array&) = delete;
|
||||
vertex_array(const vertex_array&) = delete;
|
||||
|
||||
basic_vertex_array(basic_vertex_array&&) = delete;
|
||||
vertex_array(vertex_array&&) = delete;
|
||||
|
||||
basic_vertex_array& operator=(const basic_vertex_array&) = delete;
|
||||
vertex_array& operator=(const vertex_array&) = delete;
|
||||
|
||||
basic_vertex_array& operator=(basic_vertex_array&&) = delete;
|
||||
vertex_array& operator=(vertex_array&&) = delete;
|
||||
|
||||
/**
|
||||
* This function takes ownership of the underlying VBO (GPU side). It will be freed when the basic vertex array is deleted
|
||||
|
@ -143,7 +143,7 @@ namespace blt::gfx
|
|||
glBindVertexArray(vaoID);
|
||||
}
|
||||
|
||||
~basic_vertex_array();
|
||||
~vertex_array();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -104,12 +104,12 @@ namespace blt::gfx
|
|||
* ----------------------------
|
||||
*/
|
||||
|
||||
basic_vertex_array::basic_vertex_array(): vaoID(0)
|
||||
vertex_array::vertex_array(): vaoID(0)
|
||||
{
|
||||
glGenVertexArrays(1, &vaoID);
|
||||
}
|
||||
|
||||
basic_vertex_array::~basic_vertex_array()
|
||||
vertex_array::~vertex_array()
|
||||
{
|
||||
// free all VBOs
|
||||
for (size_t i = 0; i < VBOs.used(); i++)
|
||||
|
@ -119,7 +119,7 @@ namespace blt::gfx
|
|||
glDeleteVertexArrays(1, &vaoID);
|
||||
}
|
||||
|
||||
void basic_vertex_array::bindVBO(const vbo_t& vbo, int attribute_number, int coordinate_size, GLenum type, int stride, long offset)
|
||||
void vertex_array::bindVBO(const vbo_t& vbo, int attribute_number, int coordinate_size, GLenum type, int stride, long offset)
|
||||
{
|
||||
used_attributes.insert(attribute_number);
|
||||
bind();
|
||||
|
|
Loading…
Reference in New Issue