Voltray Engine Docs
Loading...
Searching...
No Matches
IndexBuffer Class Reference

Manages an OpenGL index buffer object (IBO) for efficient rendering of indexed geometry. More...

#include <IndexBuffer.h>

Public Member Functions

 IndexBuffer (unsigned int *indices, unsigned int count)
 
 ~IndexBuffer ()
 
void Bind () const
 
void Unbind () const
 
unsigned int GetCount () const
 

Detailed Description

Manages an OpenGL index buffer object (IBO) for efficient rendering of indexed geometry.

The IndexBuffer class encapsulates the creation, binding, and management of an OpenGL index buffer. It stores indices used for drawing elements and provides methods to bind and unbind the buffer. It is typically used in conjunction with a Vertex Array Object (VAO) to render complex shapes without duplicating vertex data.

Note
The indices are expected to be of type unsigned int, and the count represents the number of indices.

Constructor & Destructor Documentation

◆ IndexBuffer()

IndexBuffer::IndexBuffer ( unsigned int *  indices,
unsigned int  count 
)

◆ ~IndexBuffer()

IndexBuffer::~IndexBuffer ( )

Member Function Documentation

◆ Bind()

void IndexBuffer::Bind ( ) const

◆ GetCount()

unsigned int IndexBuffer::GetCount ( ) const
inline

◆ Unbind()

void IndexBuffer::Unbind ( ) const

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