2D_Game_Engine
Loading...
Searching...
No Matches
vertexbuffer.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <global.hpp>
4#include <structs.hpp>
5
7public:
8 VertexBuffer(unsigned int num_vertices,unsigned int vertex_size,GLenum usage);
9 VertexBuffer()=default;
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
18private:
19 unsigned int m_ID;
20};
void SetData(unsigned int vertex_index, float *data, unsigned int num_vertices, unsigned int VertexSize)
void Bind() const
static std::array< Vertex, 4 > CreateQuad(float x, float y, float w, float h, int layer, float texID)
void Unbind() const
VertexBuffer()=default
YAML::Node data