igor::iBufferLayout Class Reference

#include <iBufferLayout.h>

Public Member Functions

 iBufferLayout ()=default
 
 iBufferLayout (const std::vector< iBufferLayoutEntry > &elements)
 
void addElement (const iBufferLayoutEntry &element)
 
uint32 getStride () const
 
const std::vector< iBufferLayoutEntry > & getElements () const
 

Detailed Description

the information on how to interpret the data in a given buffer

This is based on a great idea from https://github.com/TheCherno/Hazel

Constructor & Destructor Documentation

◆ iBufferLayout() [1/2]

igor::iBufferLayout::iBufferLayout ( )
default

does nothing

◆ iBufferLayout() [2/2]

igor::iBufferLayout::iBufferLayout ( const std::vector< iBufferLayoutEntry > &  elements)

init layout with given layout elements

Parameters
elementsgiven elements

Member Function Documentation

◆ addElement()

void igor::iBufferLayout::addElement ( const iBufferLayoutEntry element)

adds an element to the layout

Parameters
elementthe element to be added

◆ getElements()

const std::vector< iBufferLayoutEntry > & igor::iBufferLayout::getElements ( ) const
Returns
elements of layout

◆ getStride()

uint32_t igor::iBufferLayout::getStride ( ) const
Returns
stride of layout configuration in byte

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