X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel.hpp;h=4fd4515563022215e0ca8e2f847813b4610b501f;hb=2d8c7c015478a4528c0909f11d43998b1393948d;hp=1e9dab9d1cde0132c30c1cdad9d656c3e5a47a7a;hpb=4d0ef1687987a0801469c7262f81efd36636605a;p=blank.git diff --git a/src/model.hpp b/src/model.hpp index 1e9dab9..4fd4515 100644 --- a/src/model.hpp +++ b/src/model.hpp @@ -45,6 +45,42 @@ private: }; + +class OutlineModel { + +public: + std::vector vertices; + std::vector 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