TextureMesh.h 488 B

123456789101112131415161718192021222324252627282930
  1. #ifndef TEXTUREMESH_H
  2. #define TEXTUREMESH_H
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. class TextureMesh
  6. {
  7. public:
  8. TextureMesh();
  9. TextureMesh(const TextureMesh& orig);
  10. virtual ~TextureMesh();
  11. void init();
  12. void addPoint(float x, float y, float z, float tx, float ty);
  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