Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Mesh.h, by Geklmin and Bennybox
- #ifndef MESH_H
- #define MESH_H
- //#include "vgl.h"
- #include <GL3/gl3w.h>
- #include <GL3/gl3.h>
- #include <glm/glm.hpp>
- #include <cstdlib>
- #include <vector>
- #include <GLFW/glfw3.h>
- #include "LoadShaders.h"
- class Vertex
- {
- public:
- Vertex(const glm::vec3& pos){
- this->pos = pos;
- }
- glm::vec3 pos;
- glm::vec3* getPos(){
- return &pos;
- }
- virtual ~Vertex() {}
- protected:
- private:
- };
- class Mesh
- {
- public:
- Mesh(Vertex* vertices, unsigned int numVertices);
- void Draw();
- virtual ~Mesh();
- protected:
- private:
- enum {
- POSITION_VB,
- NUM_BUFFERS
- };
- GLuint m_vertexArrayObject;
- GLuint m_vertexArrayBuffers[NUM_BUFFERS];
- unsigned int m_drawCount;
- };
- #endif // Mesh_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement