1 #ifndef BLANK_GRAPHICS_VERTEXARRAY_HPP_
2 #define BLANK_GRAPHICS_VERTEXARRAY_HPP_
10 template<std::size_t N>
14 static constexpr std::size_t NUM_ATTRS = N;
17 VertexArray() noexcept;
18 ~VertexArray() noexcept;
20 VertexArray(const VertexArray<N> &) = delete;
21 VertexArray<N> &operator =(const VertexArray<N> &) = delete;
23 VertexArray(VertexArray<N> &&) noexcept;
24 VertexArray<N> &operator =(VertexArray<N> &&) noexcept;
27 void Bind() const noexcept;
30 void PushAttribute(std::size_t which, const std::vector<T> &data) noexcept;
33 void PushIndices(std::size_t which, const std::vector<T> &indices) noexcept;
35 void DrawLineElements() const noexcept;
36 void DrawTriangleElements() const noexcept;
39 void BindAttribute(std::size_t which) const noexcept;
40 void EnableAttribute(std::size_t which) noexcept;
42 void AttributeData(const std::vector<T> &) noexcept;
44 void AttributePointer(std::size_t which) noexcept;
46 void BindIndex(std::size_t which) const noexcept;
48 void IndexData(const std::vector<T> &) noexcept;
52 GLuint attr_id[NUM_ATTRS];
54 std::size_t idx_count;
61 #include "VertexArray.inl"