Mesh.h 453 B

12345678910111213141516171819202122232425262728
  1. #ifndef MESH_H
  2. #define MESH_H
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. class Mesh
  6. {
  7. public:
  8. Mesh();
  9. Mesh(const Mesh& orig);
  10. virtual ~Mesh();
  11. void init();
  12. void addPoint(float x, float y, float z, float r, float g, float b, float a);
  13. void build();
  14. void draw();
  15. private:
  16. GLuint vba = 0;
  17. GLuint vbo = 0;
  18. unsigned int vertices = 0;
  19. unsigned int dataSize = 3;
  20. float* data = nullptr;
  21. };
  22. #endif