]> git.localhorst.tv Git - blank.git/blobdiff - src/model.hpp
outline pointed-at block
[blank.git] / src / model.hpp
index 1e9dab9d1cde0132c30c1cdad9d656c3e5a47a7a..4fd4515563022215e0ca8e2f847813b4610b501f 100644 (file)
@@ -45,6 +45,42 @@ private:
 
 };
 
+
+class OutlineModel {
+
+public:
+       std::vector<glm::vec3> vertices;
+       std::vector<glm::vec3> colors;
+
+public:
+       OutlineModel();
+       ~OutlineModel();
+
+       OutlineModel(const OutlineModel &) = delete;
+       OutlineModel &operator =(const OutlineModel &) = delete;
+
+       void Invalidate() { dirty = true; }
+
+       void Clear();
+       void Reserve(int);
+
+       void Draw();
+
+private:
+       void Update();
+
+private:
+       enum Attribute {
+               ATTRIB_VERTEX,
+               ATTRIB_COLOR,
+               ATTRIB_COUNT,
+       };
+
+       GLuint handle[ATTRIB_COUNT];
+       bool dirty;
+
+};
+
 }
 
 #endif