Hi everyone,
I have some compositor workspace listeners setup that I only want to execute on passes that aren't part of a compositor shadow node.
I currently check the parent node name (pass->getParentNode()->getName() == ...) to see if it's the main render node but it doesn't feel right.
Is there better more generic way of checking for this?
Thanks,
Kaylx
[2.1] CompositorWorkspaceListener & Shadow Nodes
- Kaylx
- Greenskin
- Posts: 123
- Joined: Sun May 22, 2011 10:45 pm
- Location: Scotland
- x 7
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: [2.1] CompositorWorkspaceListener & Shadow Nodes
Hi!
Aside from the name, CompositorNodeDef contains mCustomIdentifier which is an arbitrary value to individually identify nodes.
Additionally/alternatively, you can look at CompositorPassDef::mExecutionMask which is used to prevent a pass from being executed (the mask is provided in CompositorManager2::addWorkspace).
You could theoretically pass a mask of 0xff addWorkspace (i.e. always execute) and use mExecutionMask to identify your passes.
Aside from the name, CompositorNodeDef contains mCustomIdentifier which is an arbitrary value to individually identify nodes.
Additionally/alternatively, you can look at CompositorPassDef::mExecutionMask which is used to prevent a pass from being executed (the mask is provided in CompositorManager2::addWorkspace).
You could theoretically pass a mask of 0xff addWorkspace (i.e. always execute) and use mExecutionMask to identify your passes.
- Kaylx
- Greenskin
- Posts: 123
- Joined: Sun May 22, 2011 10:45 pm
- Location: Scotland
- x 7
Re: [2.1] CompositorWorkspaceListener & Shadow Nodes
Thanks for the help Matias,
I'll use mCustomIdentifier in CompositorNodeDef as I already do something similar with mIdentifier in CompositorPassDef.
Regards,
Kaylx
I'll use mCustomIdentifier in CompositorNodeDef as I already do something similar with mIdentifier in CompositorPassDef.
Regards,
Kaylx