NAP
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RenderChain Class Reference

#include <renderlayer.h>

Public Member Functions

 RenderChain (nap::Core &core)
 
virtual bool init (utility::ErrorState &errorState) override
 
virtual void onDestroy () override
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::vector< rtti::ObjectPtr< RenderLayer > > mLayers
 Property: 'Layers' The render layers in ranked order. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Static Public Attributes

static constexpr int invalidRank = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Controls the order in which components are rendered.

The index of a layer in the chain = the rank that ultimately controls the order in which components are rendered. Components with a layer of rank (index) 0 are rendered first, after that components with a rank (index) of 1 etc. Note that layers are optional, components without a layer are assigned a default rank of 0.

Inheritance diagram for RenderChain:
[legend]
Collaboration diagram for RenderChain:
[legend]

Constructor & Destructor Documentation

◆ RenderChain()

RenderChain ( nap::Core core)

Member Function Documentation

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Assigns layer indices, ensures entries are valid and registers the chain for render operations

Parameters
errorStatecontains the error if initialization fails

Reimplemented from Object.

◆ onDestroy()

virtual void onDestroy ( )
overridevirtual

Unregisters the chain for subsequent render operations

Reimplemented from Object.

Member Data Documentation

◆ invalidRank

constexpr int invalidRank = -1
staticconstexpr

◆ mLayers

std::vector<rtti::ObjectPtr<RenderLayer> > mLayers

Property: 'Layers' The render layers in ranked order.