Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
vertexarray.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 // GLEW
5 #include <GL/glew.h>
7 
8 #include <src/utils/glassert.h>
9 
10 namespace fireworks { namespace graphics {
11 
14  {
15  private:
16  GLuint m_ArrayID;
17  std::vector<Buffer*> m_Buffers;
18  public:
20  VertexArray();
21  ~VertexArray();
22 
27  void addBuffer(Buffer* buffer, GLuint index);
29  void bind() const;
31  void unbind() const;
32  };
33 
34 } }
void addBuffer(Buffer *buffer, GLuint index)
Adds the the vertex buffer (VBO) to the VAO.
Definition: vertexarray.cpp:18
Definition: audioclip.cpp:3
void bind() const
Binds the vertex array.
Definition: vertexarray.cpp:32
VertexArray()
Generates VAO.
Definition: vertexarray.cpp:5
void unbind() const
Unbind the vertex array.
Definition: vertexarray.cpp:37
~VertexArray()
Definition: vertexarray.cpp:10
Creates Vertex Array Object (VAOs).
Definition: vertexarray.h:13
Creates Vertex Buffers.
Definition: buffer.h:11