Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::RenderTechniques Class Reference

Graphics class that represents the techniques used in rendering. More...

Public Types

using RenderTechniqueFactory = AbstractRenderTechnique *(*)()
 

Static Public Member Functions

static AbstractRenderTechniqueGetByEnum (RenderTechniqueType renderTechnique, int *techniqueRanking=nullptr)
 Gets the technique by enumeration. More...
 
static AbstractRenderTechniqueGetByIndex (unsigned int index, int *techniqueRanking=nullptr)
 Gets the technique by index. More...
 
static AbstractRenderTechniqueGetByName (const String &name, int *techniqueRanking=nullptr)
 Gets the technique by name. More...
 
static AbstractRenderTechniqueGetByRanking (int maxRanking, int *techniqueRanking=nullptr)
 Gets the technique by ranking. More...
 
static std::size_t GetCount ()
 Gets the number of techniques available. More...
 
static void Register (const String &name, int ranking, RenderTechniqueFactory factory)
 Registers a technique. More...
 
static String ToString (RenderTechniqueType renderTechnique)
 Converts the enumeration to string. More...
 
static void Unregister (const String &name)
 Unregisters a technique. More...
 

Detailed Description

Graphics class that represents the techniques used in rendering.

Member Function Documentation

◆ GetByEnum()

AbstractRenderTechnique * Nz::RenderTechniques::GetByEnum ( RenderTechniqueType  renderTechnique,
int *  techniqueRanking = nullptr 
)
static

Gets the technique by enumeration.

Returns
A reference to the newly created technique
Parameters
renderTechniqueEnumeration of the technique
techniqueRankingRanking for the technique
Remarks
Produces a NazaraError if renderTechnique does not exist

◆ GetByIndex()

AbstractRenderTechnique * Nz::RenderTechniques::GetByIndex ( unsigned int  index,
int *  techniqueRanking = nullptr 
)
static

Gets the technique by index.

Returns
A reference to the newly created technique
Parameters
indexIndex of the technique
techniqueRankingRanking for the technique
Remarks
Produces a NazaraError if index is out or range

◆ GetByName()

AbstractRenderTechnique * Nz::RenderTechniques::GetByName ( const String name,
int *  techniqueRanking = nullptr 
)
static

Gets the technique by name.

Returns
A reference to the newly created technique
Parameters
nameName of the technique
techniqueRankingRanking for the technique
Remarks
Produces a NazaraError if name does not exist or is invalid

◆ GetByRanking()

AbstractRenderTechnique * Nz::RenderTechniques::GetByRanking ( int  maxRanking,
int *  techniqueRanking = nullptr 
)
static

Gets the technique by ranking.

Returns
A reference to the newly created technique
Parameters
maxRankingRanking maximum of the technique
techniqueRankingRanking for the technique
Remarks
Produces a NazaraError if name does not exist or is invalid

◆ GetCount()

std::size_t Nz::RenderTechniques::GetCount ( )
static

Gets the number of techniques available.

Returns
Number of techniques

◆ Register()

void Nz::RenderTechniques::Register ( const String name,
int  ranking,
RenderTechniqueFactory  factory 
)
static

Registers a technique.

Parameters
nameName of the technique
rankingRanking of the technique
factoryFactory to create the technique
Remarks
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if name is empty
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if ranking is negative
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if factory is invalid is invalid

◆ ToString()

String Nz::RenderTechniques::ToString ( RenderTechniqueType  renderTechnique)
static

Converts the enumeration to string.

Returns
String symbolizing the technique
Parameters
renderTechniqueEnumeration of the technique
Remarks
Produces a NazaraError if renderTechnique does not exist and returns "Error"

◆ Unregister()

void Nz::RenderTechniques::Unregister ( const String name)
static

Unregisters a technique.

Parameters
nameName of the technique

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