diff options
Diffstat (limited to 'gfx/models/mesh.h')
-rw-r--r-- | gfx/models/mesh.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 538c57a..9b22b02 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -1,25 +1,25 @@ -#pragma once
-
-#include <GL/glew.h>
-#include <glArrays.h>
-#include <memory>
-#include <span>
-#include <stdTypeDefs.hpp>
-
-class Vertex;
-class VertexArrayObject;
-
-class Mesh : public ConstTypeDefs<Mesh> {
-public:
- Mesh(const std::span<const Vertex> vertices, const std::span<const unsigned int> indices, GLenum = GL_TRIANGLES);
-
- void Draw() const;
- void DrawInstanced(GLuint vao, GLsizei count) const;
- VertexArrayObject & configureVAO(VertexArrayObject &&) const;
-
-private:
- glVertexArray m_vertexArrayObject;
- glBuffers<2> m_vertexArrayBuffers;
- GLsizei m_numIndices;
- GLenum mode;
-};
+#pragma once + +#include <GL/glew.h> +#include <glArrays.h> +#include <memory> +#include <span> +#include <stdTypeDefs.hpp> + +class Vertex; +class VertexArrayObject; + +class Mesh : public ConstTypeDefs<Mesh> { +public: + Mesh(const std::span<const Vertex> vertices, const std::span<const unsigned int> indices, GLenum = GL_TRIANGLES); + + void Draw() const; + void DrawInstanced(GLuint vao, GLsizei count) const; + VertexArrayObject & configureVAO(VertexArrayObject &&) const; + +private: + glVertexArray m_vertexArrayObject; + glBuffers<2> m_vertexArrayBuffers; + GLsizei m_numIndices; + GLenum mode; +}; |