Brunot
Loading...
Searching...
No Matches
VertexBuffer.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19
20#pragma once
21
22
23using GLuint = unsigned int;
24
25namespace gfx
26{
27
32{
33public:
34 VertexBuffer(const float* data, unsigned int bytes);
36 // ! warning: copy and move operators all do shallow copies
37 VertexBuffer(const VertexBuffer& other) = default;
38 VertexBuffer(VertexBuffer&& other) noexcept = default;
39 auto operator=(const VertexBuffer& other) -> VertexBuffer& = default;
40 auto operator=(VertexBuffer&& other) noexcept -> VertexBuffer& = default;
41
42 auto activate() const -> void;
43 auto deactivate() const -> void;
44
45 auto getID() const -> GLuint;
46
47private:
49};
50}
unsigned int GLuint
Definition IndexBuffer.h:17
VertexBuffer(VertexBuffer &&other) noexcept=default
auto getID() const -> GLuint
Definition VertexBuffer.cpp:53
auto operator=(VertexBuffer &&other) noexcept -> VertexBuffer &=default
auto activate() const -> void
Definition VertexBuffer.cpp:42
auto operator=(const VertexBuffer &other) -> VertexBuffer &=default
GLuint ID
Definition VertexBuffer.h:48
VertexBuffer(const VertexBuffer &other)=default
~VertexBuffer()
Definition VertexBuffer.cpp:37
auto deactivate() const -> void
Definition VertexBuffer.cpp:48
VertexBuffer(const float *data, unsigned int bytes)
Definition VertexBuffer.cpp:28
Definition Sprite.h:25