X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel%2FSkyBoxModel.hpp;fp=src%2Fmodel%2FSkyBoxModel.hpp;h=84555eea4e1c656b0a3e7bf93e0052bbe3ddaea8;hb=8ab4ea13545cccbacbd1ed610968d3f481c1b3c8;hp=0000000000000000000000000000000000000000;hpb=be3a81656b8493010d2329fa00da617e24293438;p=blank.git diff --git a/src/model/SkyBoxModel.hpp b/src/model/SkyBoxModel.hpp new file mode 100644 index 0000000..84555ee --- /dev/null +++ b/src/model/SkyBoxModel.hpp @@ -0,0 +1,59 @@ +#ifndef BLANK_MODEL_SKYBOXMODEL_HPP_ +#define BLANK_MODEL_SKYBOXMODEL_HPP_ + +#include "../graphics/VertexArray.hpp" + +#include +#include + + +namespace blank { + +class SkyBoxModel { + +public: + using Position = glm::vec3; + using Index = unsigned int; + + using Positions = std::vector; + using Indices = std::vector; + + enum Attribute { + ATTRIB_VERTEX, + ATTRIB_INDEX, + ATTRIB_COUNT, + }; + + struct Buffer { + + Positions vertices; + Indices indices; + + void Clear() noexcept { + vertices.clear(); + indices.clear(); + } + + void Reserve(size_t p, size_t i) { + vertices.reserve(p); + indices.reserve(i); + } + + }; + + using VAO = VertexArray; + +public: + void LoadUnitBox(); + void Update(const Buffer &) noexcept; + + void Draw() const noexcept; + +private: + VAO vao; + +}; + +} + +#endif