2D_Game_Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
VertexBuffer Class Reference

#include <vertexbuffer.hpp>

Public Member Functions

 VertexBuffer (unsigned int num_vertices, unsigned int vertex_size, GLenum usage)
 
 VertexBuffer ()=default
 
 ~VertexBuffer ()
 
void SetData (unsigned int vertex_index, float *data, unsigned int num_vertices, unsigned int VertexSize)
 
void Bind () const
 
void Unbind () const
 

Static Public Member Functions

static std::array< Vertex, 4 > CreateQuad (float x, float y, float w, float h, int layer, float texID)
 
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)
 

Detailed Description

Definition at line 6 of file vertexbuffer.hpp.

Constructor & Destructor Documentation

◆ VertexBuffer() [1/2]

VertexBuffer::VertexBuffer ( unsigned int num_vertices,
unsigned int vertex_size,
GLenum usage )

Definition at line 4 of file vertexbuffer.cpp.

◆ VertexBuffer() [2/2]

VertexBuffer::VertexBuffer ( )
default

◆ ~VertexBuffer()

VertexBuffer::~VertexBuffer ( )

Definition at line 10 of file vertexbuffer.cpp.

Member Function Documentation

◆ Bind()

void VertexBuffer::Bind ( ) const

Definition at line 14 of file vertexbuffer.cpp.

◆ CreateQuad() [1/2]

std::array< Vertex, 4 > VertexBuffer::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 )
static

Definition at line 50 of file vertexbuffer.cpp.

◆ CreateQuad() [2/2]

std::array< Vertex, 4 > VertexBuffer::CreateQuad ( float x,
float y,
float w,
float h,
int layer,
float texID )
static

Definition at line 22 of file vertexbuffer.cpp.

◆ SetData()

void VertexBuffer::SetData ( unsigned int vertex_index,
float * data,
unsigned int num_vertices,
unsigned int VertexSize )

Definition at line 79 of file vertexbuffer.cpp.

◆ Unbind()

void VertexBuffer::Unbind ( ) const

Definition at line 18 of file vertexbuffer.cpp.


The documentation for this class was generated from the following files: