27#ifndef EASY_RENDERER_VERTEX_ARRAY_OBJECT_H
28#define EASY_RENDERER_VERTEX_ARRAY_OBJECT_H
30#include <easy3d/renderer/opengl.h>
54 static bool is_supported();
59 GLuint id()
const {
return id_; }
76 bool create_array_buffer(GLuint& buffer, GLuint index,
const void* data, std::size_t size, std::size_t dim,
bool dynamic =
false);
77 bool create_element_buffer(GLuint& buffer,
const void* data, std::size_t size,
bool dynamic =
false);
80 bool create_storage_buffer(GLuint& buffer, GLuint index,
const void* data, std::size_t size);
81 bool update_storage_buffer(GLuint& buffer, GLintptr offset, GLsizeiptr size,
const void* data);
97 static void get_buffer_data(GLenum target, GLuint buffer, GLintptr offset, GLsizeiptr size,
void* data);
102 static void* map_buffer(GLenum target, GLuint buffer, GLenum access);
103 static void unmap_buffer(GLenum target, GLuint buffer);
A thin wrapper around an OpenGL Vertex Array Object (VAO).
Definition: vertex_array_object.h:52
bool create_array_buffer(GLuint &buffer, GLuint index, const void *data, std::size_t size, std::size_t dim, bool dynamic=false)
Creates an OpenGL array buffer and upload data to the buffer.
Definition: vertex_array_object.cpp:100
static void release_buffer(GLuint &buffer)
Frees the GPU memory of the buffer specified by 'handle'.
Definition: vertex_array_object.cpp:91
static void get_buffer_data(GLenum target, GLuint buffer, GLintptr offset, GLsizeiptr size, void *data)
Definition: vertex_array_object.cpp:194
Definition: collider.cpp:182