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
29{
30public:
31 VertexBuffer(const float* data, unsigned int bytes);
33 // ! warning: copy and move operators all do shallow copies
34 VertexBuffer(const VertexBuffer& other) = default;
35 VertexBuffer(VertexBuffer&& other) noexcept = default;
36 auto operator=(const VertexBuffer& other) -> VertexBuffer& = default;
37 auto operator=(VertexBuffer&& other) noexcept -> VertexBuffer& = default;
38
39 auto activate() const -> void;
40 auto deactivate() const -> void;
41
42 auto getID() const -> GLuint;
43
44private:
46};
unsigned int GLuint
Definition IndexBuffer.h:17
GLuint ID
Definition VertexBuffer.h:45
auto operator=(VertexBuffer &&other) noexcept -> VertexBuffer &=default
~VertexBuffer()
Definition VertexBuffer.cpp:34
auto operator=(const VertexBuffer &other) -> VertexBuffer &=default
VertexBuffer(const float *data, unsigned int bytes)
Definition VertexBuffer.cpp:25
auto deactivate() const -> void
Definition VertexBuffer.cpp:45
VertexBuffer(VertexBuffer &&other) noexcept=default
auto activate() const -> void
Definition VertexBuffer.cpp:39
auto getID() const -> GLuint
Definition VertexBuffer.cpp:50
VertexBuffer(const VertexBuffer &other)=default