cangine
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
cangine::EBO Class Reference

Wraps an OpenGL Element Buffer Object (index buffer). More...

#include <ebo.hpp>

Public Member Functions

 EBO ()
 Generates the underlying OpenGL buffer object.
 
void update (const std::vector< unsigned int > &indices)
 Uploads index data to the buffer.
 
void bind ()
 Binds the buffer as the current element array buffer.
 

Private Attributes

unsigned int ID
 OpenGL buffer object handle.
 

Detailed Description

Wraps an OpenGL Element Buffer Object (index buffer).

Stores the index data that tells the GPU which vertices form each primitive, allowing vertices to be reused across triangles.

Constructor & Destructor Documentation

◆ EBO()

cangine::EBO::EBO ( )

Generates the underlying OpenGL buffer object.

Member Function Documentation

◆ bind()

void cangine::EBO::bind ( )

Binds the buffer as the current element array buffer.

◆ update()

void cangine::EBO::update ( const std::vector< unsigned int > &  indices)

Uploads index data to the buffer.

Parameters
indicesVertex indices defining the primitives.

Member Data Documentation

◆ ID

unsigned int cangine::EBO::ID
private

OpenGL buffer object handle.


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