Nameless Engine
Loading...
Searching...
No Matches
ne::ShaderArrayIndex Class Reference

#include <ShaderArrayIndexManager.h>

Public Member Functions

 ShaderArrayIndex (const ShaderArrayIndex &)=delete
 
ShaderArrayIndexoperator= (const ShaderArrayIndex &)=delete
 
 ShaderArrayIndex (ShaderArrayIndex &&)=delete
 
ShaderArrayIndexoperator= (ShaderArrayIndex &&)=delete
 
unsigned int getActualIndex () const
 
 ~ShaderArrayIndex ()
 

Private Member Functions

 ShaderArrayIndex (ShaderArrayIndexManager *pManager, unsigned int iIndexIntoShaderArray)
 

Private Attributes

ShaderArrayIndexManagerpManager = nullptr
 
unsigned int iIndexIntoShaderArray
 

Friends

class ShaderArrayIndexManager
 

Detailed Description

RAII-style class that holds an index into a shader array and marks it as unused in destructor so that other shader resources can use it later.

Constructor & Destructor Documentation

◆ ~ShaderArrayIndex()

ne::ShaderArrayIndex::~ShaderArrayIndex ( )

Notifies the manager (that created this index) about index no longer being used.

◆ ShaderArrayIndex()

ne::ShaderArrayIndex::ShaderArrayIndex ( ShaderArrayIndexManager pManager,
unsigned int  iIndexIntoShaderArray 
)
private

Constructs a new array index.

Parameters
pManagerManager that created this index.
iIndexIntoShaderArrayActual index into a shader array.

Member Function Documentation

◆ getActualIndex()

unsigned int ne::ShaderArrayIndex::getActualIndex ( ) const

Returns an actual index into the shader array.

Returns
Index into the shader array.

Friends And Related Function Documentation

◆ ShaderArrayIndexManager

friend class ShaderArrayIndexManager
friend

Only index manager can created indices.

Member Data Documentation

◆ iIndexIntoShaderArray

unsigned int ne::ShaderArrayIndex::iIndexIntoShaderArray
private

Actual index into a shader array.

◆ pManager

ShaderArrayIndexManager* ne::ShaderArrayIndex::pManager = nullptr
private

Manager that created this index.


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