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

#include <renderlayer.h>

Public Member Functions

const std::string & getName () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::string mName
 Property: 'Name' The render layer name. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

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

Description

Render layers can be used to group render components and configure the order in which they should be rendered. nap::RenderLayer objects are ordered in a nap::RenderChain under the property Layers. The index of the layer in this list determines the rank of the nap::RenderLayer where 0 is the front, and the last index is the back. Render components without a layer assigned default to the front (index 0).

One useful approach for layers is when rendering a sky box or some other object that fills the background. This should always be rendered first, regardless of the transform it has. To do this, you add a layer named "Background" to the nap::RenderChain and assign it to the background render component. Other objects in the scene can be assigned to the layer "Default" (on index 0) and will be sorted routinely based on the specified sorting algorithm.

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

Member Function Documentation

◆ getName()

const std::string& getName ( ) const
Returns
the name of the layer in the chain

Member Data Documentation

◆ mName

std::string mName

Property: 'Name' The render layer name.