#include <rendertag.h>
Public Member Functions | |
RenderTag (Core &core) | |
virtual | ~RenderTag ()=default |
virtual bool | start (utility::ErrorState &errorState) override |
virtual void | stop () override |
RenderMask | getMask () const |
RenderMask | operator| (const RenderTag &other) const |
RenderMask | operator| (RenderMask other) const |
operator RenderMask () const | |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
std::string | mName |
Property: 'Name' The tag name. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Render tags can be used to categorize render components. Unlike render layers, tags are unordered and multiple of them can be assigned to a single render component. Each tag resource registers itself in the render service and is assigned a unique tag index on app initialization. This ensures tags can be composited into render masks, which are bit flags that are fast to compare.
One useful example would be to categorize specific components as "Debug", distinguishing objects used as visual aid for debugging purposes from standard objects (tag "Default"). They may be excluded from rendering based on settings or a window setup for instance. You could do the following:
|
virtualdefault |
RenderMask getMask | ( | ) | const |
Returns the mask assigned by the renderer to this tag. The mask can be composited together with masks of other tags to create a unique bit mask:
operator RenderMask | ( | ) | const |
RenderMask operator| | ( | const RenderTag & | other | ) | const |
Mask inclusion operator: Combines this tag with the given tag.
other | the tag to composite |
RenderMask operator| | ( | RenderMask | other | ) | const |
Mask inclusion operator: Combines this tag with the given mask.
other | the mask to composite |
|
overridevirtual |
Register the RenderTag with the RenderService
Reimplemented from Device.
|
overridevirtual |
Unregister the RenderTag with the RenderService
Reimplemented from Device.
std::string mName |
Property: 'Name' The tag name.