16#include "AUI/Common/AVector.h"
17#include "AUI/Util/AArrayView.h"
21 class API_AUI_VIEWS
Vao {
25 uint32_t signature = 0;
35 const char* lastModifierKey =
nullptr;
48 void bind() const noexcept;
49 static
void unbind() noexcept;
58 void insert(GLuint index,
AArrayView<T> data, const
char* key) {
59 if constexpr (std::is_same_v<T, GLuint>) {
60 insertInteger(index, (
const char*)data.data(), data.sizeInBytes(), 1, GL_UNSIGNED_INT);
62 insert(index, (
const char*)data.data(), data.sizeInBytes(),
sizeof(T) /
sizeof(
float), GL_FLOAT, key);
74 insertIfKeyMismatches(index, (
const char*)data.data(), data.sizeInBytes(),
sizeof(T) /
sizeof(
float), GL_FLOAT, key);
83 void drawArrays(GLenum
type, GLsizei count);
89 void drawElements(GLenum
type = GL_TRIANGLES);
94 GLuint mIndicesBuffer = 0;
95 GLsizei mIndicesCount = 0;
106 void insert(GLuint index,
const char* data, GLsizeiptr dataSize, GLuint vertexSize, GLenum dataType,
const char* key);
116 void insertIfKeyMismatches(GLuint index,
const char* data, GLsizeiptr dataSize, GLuint vertexSize, GLenum dataType,
const char* key);
126 void insertInteger(GLuint index,
const char* data, GLsizeiptr dataSize, GLuint vertexSize, GLenum dataType);
Definition: AArrayView.h:25
A std::vector with AUI extensions.
Definition: AVector.h:38
void insertIfKeyMismatches(GLuint index, AArrayView< T > data, const char *key)
Creates VBO or modifies existing one, if the key pointer mismatches.
Definition: Vao.h:73