diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-29 18:50:02 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-29 18:50:02 +0100 |
commit | 4fb3a5ae0f53a6fa3f4901f92e64f1de8d2dbb17 (patch) | |
tree | 6f4bd0c999e3b4a11410aed234622e80842261ad /gfx/models/mesh.h | |
parent | Lookup material details once in the vertex shader (diff) | |
download | ilt-4fb3a5ae0f53a6fa3f4901f92e64f1de8d2dbb17.tar.bz2 ilt-4fb3a5ae0f53a6fa3f4901f92e64f1de8d2dbb17.tar.xz ilt-4fb3a5ae0f53a6fa3f4901f92e64f1de8d2dbb17.zip |
Dunno how, but some DOS new lines got in here!
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; +}; |