17 using Id =
unsigned int;
21 Array = GL_ARRAY_BUFFER,
23 ElementArray = GL_ELEMENT_ARRAY_BUFFER,
25 Uniform = GL_UNIFORM_BUFFER,
29 TransformFeedback = GL_TRANSFORM_FEEDBACK_BUFFER,
31 CopyRead = GL_COPY_READ_BUFFER,
33 PixelUnpack = GL_PIXEL_UNPACK_BUFFER,
35 ShaderStorage = GL_SHADER_STORAGE_BUFFER,
41 StreamDraw = GL_STREAM_DRAW,
42 StreamRead = GL_STREAM_READ,
43 StreamCopy = GL_STREAM_COPY,
45 StaticDraw = GL_STATIC_DRAW,
46 StaticRead = GL_STATIC_READ,
47 StaticCopy = GL_STATIC_COPY,
49 DynamicDraw = GL_DYNAMIC_DRAW,
50 DynamicRead = GL_DYNAMIC_READ,
51 DynamicCopy = GL_DYNAMIC_COPY,
56 static int tot_memory;
67 this->target = other.target;
68 this->memory = other.memory;
76 this->target = other.target;
77 this->memory = other.memory;
86 void init(Target target);
89 virtual void bind()
const;
90 virtual void unbind()
const;
94 Buffer::Id get_id()
const;
99 void set_id(Buffer::Id
id);
100 void set_target(Target target);
104 void copy_data(
const void *data, GLsizeiptr size, DataUsage usage);