2D_Game_Engine
Loading...
Searching...
No Matches
include
vertexbuffer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
global.hpp
>
4
#include <
structs.hpp
>
5
6
class
VertexBuffer
{
7
public
:
8
VertexBuffer
(
unsigned
int
num_vertices,
unsigned
int
vertex_size,GLenum usage);
9
VertexBuffer
()=
default
;
10
~VertexBuffer
();
11
12
void
SetData
(
unsigned
int
vertex_index,
float
*
data
,
unsigned
int
num_vertices,
unsigned
int
VertexSize);
13
static
std::array<Vertex,4>
CreateQuad
(
float
x,
float
y,
float
w,
float
h,
int
layer,
float
texID);
14
static
std::array<Vertex,4>
CreateQuad
(
float
x,
float
y,
float
w,
float
h,
float
tx,
float
ty,
float
tw,
float
th,
float
ttw,
float
tth,
int
layer,
float
texID);
15
void
Bind
()
const
;
16
void
Unbind
()
const
;
17
18
private
:
19
unsigned
int
m_ID;
20
};
VertexBuffer
Definition
vertexbuffer.hpp:6
VertexBuffer::SetData
void SetData(unsigned int vertex_index, float *data, unsigned int num_vertices, unsigned int VertexSize)
Definition
vertexbuffer.cpp:79
VertexBuffer::Bind
void Bind() const
Definition
vertexbuffer.cpp:14
VertexBuffer::CreateQuad
static std::array< Vertex, 4 > CreateQuad(float x, float y, float w, float h, int layer, float texID)
Definition
vertexbuffer.cpp:22
VertexBuffer::~VertexBuffer
~VertexBuffer()
Definition
vertexbuffer.cpp:10
VertexBuffer::Unbind
void Unbind() const
Definition
vertexbuffer.cpp:18
VertexBuffer::VertexBuffer
VertexBuffer()=default
global.hpp
data
YAML::Node data
Definition
sceneserializer.cpp:405
structs.hpp
Generated by
1.10.0