[2.1] CompositorWorkspaceListener & Shadow Nodes

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Kaylx
Greenskin
Posts: 123
Joined: Sun May 22, 2011 10:45 pm
Location: Scotland

[2.1] CompositorWorkspaceListener & Shadow Nodes

Post by Kaylx » Mon Jun 17, 2019 11:23 am

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
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4036
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 214
Contact:

Re: [2.1] CompositorWorkspaceListener & Shadow Nodes

Post by dark_sylinc » Mon Jun 17, 2019 5:51 pm

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.
0 x

User avatar
Kaylx
Greenskin
Posts: 123
Joined: Sun May 22, 2011 10:45 pm
Location: Scotland

Re: [2.1] CompositorWorkspaceListener & Shadow Nodes

Post by Kaylx » Tue Jun 18, 2019 8:55 am

Thanks for the help Matias,

I'll use mCustomIdentifier in CompositorNodeDef as I already do something similar with mIdentifier in CompositorPassDef. :)

Regards,
Kaylx
0 x

Post Reply