HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Renderer::VertexBuffer Class Reference

Wrapper for OpenGL VBO (Vertex Buffer Object). Stores raw vertex data (positions, colors, normals) on the GPU. More...

#include <src/renderer/Buffer.h>

Collaboration diagram for Renderer::VertexBuffer:
Collaboration graph

Public Member Functions

 VertexBuffer (const void *data, unsigned int uiSize)
 Creates and fills the buffer with data.
 
 ~VertexBuffer ()
 
 VertexBuffer (const VertexBuffer &)=delete
 
VertexBufferoperator= (const VertexBuffer &)=delete
 
void Bind () const
 
void Unbind () const
 
void UpdateData (const void *data, unsigned int uiSize, unsigned int uiOffset=0) const
 Updates buffer data without reallocating memory (DSA).
 

Public Attributes

unsigned int m_RendererID
 

Detailed Description

Wrapper for OpenGL VBO (Vertex Buffer Object). Stores raw vertex data (positions, colors, normals) on the GPU.

Constructor & Destructor Documentation

◆ VertexBuffer() [1/2]

Renderer::VertexBuffer::VertexBuffer ( const void *  data,
unsigned int  uiSize 
)
inline

Creates and fills the buffer with data.

Parameters
dataPointer to the data array.
uiSizeTotal size of the data in bytes.

◆ ~VertexBuffer()

Renderer::VertexBuffer::~VertexBuffer ( )
inline

◆ VertexBuffer() [2/2]

Renderer::VertexBuffer::VertexBuffer ( const VertexBuffer )
delete

Member Function Documentation

◆ Bind()

void Renderer::VertexBuffer::Bind ( ) const
inline

◆ operator=()

VertexBuffer & Renderer::VertexBuffer::operator= ( const VertexBuffer )
delete

◆ Unbind()

void Renderer::VertexBuffer::Unbind ( ) const
inline

◆ UpdateData()

void Renderer::VertexBuffer::UpdateData ( const void *  data,
unsigned int  uiSize,
unsigned int  uiOffset = 0 
) const
inline

Updates buffer data without reallocating memory (DSA).

Here is the caller graph for this function:

Member Data Documentation

◆ m_RendererID

unsigned int Renderer::VertexBuffer::m_RendererID

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