12345678910111213141516171819202122232425262728 |
- #ifndef MESH_H
- #define MESH_H
- #include <GL/glew.h>
- #include <GLFW/glfw3.h>
- class Mesh
- {
- public:
- Mesh();
- Mesh(const Mesh& orig);
- virtual ~Mesh();
-
- void init();
- void addPoint(float x, float y, float z, float r, float g, float b, float a);
- void build();
- void draw();
- private:
- GLuint vba = 0;
- GLuint vbo = 0;
-
- unsigned int vertices = 0;
- unsigned int dataSize = 3;
- float* data = nullptr;
- };
- #endif
|