14#include <AUI/Common/AVector.h>
17#include "ResourcePool.h"
21 template<gl::ResourceKind T>
41 void insert(
const char* data,
size_t length);
48 void set(
const T* data,
size_t count) {
49 static_assert(std::is_standard_layout_v<T>,
"you may use only standard layout types in gl::VertexBuffer::set");
50 insert(
reinterpret_cast<const char*
>(data), count *
sizeof(T));
55 set(data.data(), data.size());
64 void set(
const GLuint* indices, GLsizei length);
67 set(indices.data(),
static_cast<GLsizei
>(indices.size() *
sizeof(GLuint)));
70 void draw(GLenum primitiveType) {
72 drawWithoutBind(primitiveType);
74 void drawWithoutBind(GLenum primitiveType) {
75 glDrawElements(primitiveType, GLsizei(mIndicesCount), GL_UNSIGNED_INT,
nullptr);
79 size_t count()
const {
A std::vector with AUI extensions.
Definition: AVector.h:38