]> git.localhorst.tv Git - tacos.git/blobdiff - src/world/Cursor.hpp
isolate some GL stuff
[tacos.git] / src / world / Cursor.hpp
index 828e411209b89cb6022a997a689e7b5d83a70a4a..74603194ae45cfe5efa9dbd6426d7f1855db5962 100644 (file)
@@ -1,8 +1,7 @@
 #ifndef TACOS_WORLD_CURSOR_HPP_
 #define TACOS_WORLD_CURSOR_HPP_
 
-#include <GL/glew.h>
-#include <glm/glm.hpp>
+#include "../graphics/vao.hpp"
 
 
 namespace tacos {
@@ -13,10 +12,6 @@ class Cursor {
 
 public:
        Cursor();
-       ~Cursor();
-
-       Cursor(const Cursor &) = delete;
-       Cursor &operator =(const Cursor &) = delete;
 
        /// hide cursor
        void Hide() noexcept;
@@ -27,8 +22,11 @@ public:
        void Draw() const noexcept;
 
 private:
-       GLuint vao;
-       GLuint buffers[2];
+       struct Attributes {
+               glm::vec3 position;
+       };
+
+       SimpleVAO<Attributes, unsigned char> vao;
 
        // side length in vertices (make sure it's between 2 and 8 inclusive)
        int size;
@@ -40,10 +38,6 @@ private:
                FLOOR,
        } mode;
 
-       struct Attributes {
-               glm::vec3 position;
-       };
-
 };
 
 }