|
Practical Tools for Simple Design
|
Wrapper for OpenGL Vertex Array Object. More...
#include <VertexArray.hpp>
Public Member Functions | |
| VertexArray () | |
| VertexArray (const VertexArray &)=delete | |
| VertexArray (VertexArray &&other) | |
| VertexArray & | operator= (const VertexArray &)=delete |
| VertexArray & | operator= (VertexArray &&other) |
| void | Bind () const |
| void | Unbind () const |
| void | AddVertexBuffer (std::unique_ptr< VertexBuffer > vertexBuffer) |
| void | SetIndexBuffer (std::unique_ptr< IndexBuffer > indexBuffer) |
| void | DrawTriangles () const |
Wrapper for OpenGL Vertex Array Object.
| Core::VertexArray::VertexArray | ( | ) |
I dislike the way VertexBuffer and IndexBuffer are handled here. This breaks RAII principles
TODO: Maybe find an alternative solution
| void Core::VertexArray::SetIndexBuffer | ( | std::unique_ptr< IndexBuffer > | indexBuffer | ) |
Index buffer must be set or else there will be a segfault