X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel.hpp;h=62f467c4f787a6de9547f450af12197dd3e955f6;hb=0d6efa28245acaf22383bdf398b5537d1fe33ce2;hp=6e9583b3ec84f6ae05c7f1beaeeaa05b7e36e75b;hpb=82426ae2997d2b21703d2d5afb631a84736e975f;p=blank.git diff --git a/src/model.hpp b/src/model.hpp index 6e9583b..62f467c 100644 --- a/src/model.hpp +++ b/src/model.hpp @@ -11,13 +11,21 @@ namespace blank { class Model { public: + using Position = glm::vec3; + using Color = glm::vec3; + using Normal = glm::vec3; using Index = unsigned int; + using Positions = std::vector; + using Colors = std::vector; + using Normals = std::vector; + using Indices = std::vector; + public: - std::vector vertices; - std::vector colors; - std::vector normals; - std::vector indices; + Positions vertices; + Colors colors; + Normals normals; + Indices indices; public: Model(); @@ -34,6 +42,7 @@ public: void Clear(); void Reserve(int vtx_count, int idx_count); + void CheckUpdate(); void Draw(); private: @@ -48,6 +57,7 @@ private: ATTRIB_COUNT, }; + GLuint va; GLuint handle[ATTRIB_COUNT]; bool dirty; @@ -57,12 +67,18 @@ private: class OutlineModel { public: + using Position = glm::vec3; + using Color = glm::vec3; using Index = unsigned short; + using Positions = std::vector; + using Colors = std::vector; + using Indices = std::vector; + public: - std::vector vertices; - std::vector colors; - std::vector indices; + Positions vertices; + Colors colors; + Indices indices; public: OutlineModel(); @@ -89,6 +105,7 @@ private: ATTRIB_COUNT, }; + GLuint va; GLuint handle[ATTRIB_COUNT]; bool dirty;