[2.1] access workspace in HlmsListener's preparePassBuffer

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
rujialiu
Goblin
Posts: 296
Joined: Mon May 09, 2016 8:21 am
x 35

[2.1] access workspace in HlmsListener's preparePassBuffer

Post by rujialiu »

Hi!

I added some additional infomation in PassBuffer via HlmsListener's preparePassBuffer() function. It works, but I need to write different information for different workspaces. I don't think I can distinguish workspaces in my app's logic because those workspaces are executed in the same frame (e.g. one for displaying, one for background video recording but with a different camera).

Ideally, I need to read a unique identifier of the workspace (is there any?), but if I can't distinguish all workspaces for the same WorkspaceDef, it's ok to read workspacedef's name in preparePassBuffer(), because I can duplicate the workspacedef in the .compositor file, and use different workspacedefs when creating those workspaces.

What is the recommended way to do this? Thanks!
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: [2.1] access workspace in HlmsListener's preparePassBuffer

Post by dark_sylinc »

You should have access to CompositorPass via SceneManager::getCurrentCompositorPass.
From there you should be able to obtain everything (ie. parent pointers, associated definition, etc).

Cheers
rujialiu
Goblin
Posts: 296
Joined: Mon May 09, 2016 8:21 am
x 35

Re: [2.1] access workspace in HlmsListener's preparePassBuffer

Post by rujialiu »

dark_sylinc wrote: Fri Nov 16, 2018 5:56 am You should have access to CompositorPass via SceneManager::getCurrentCompositorPass.
From there you should be able to obtain everything (ie. parent pointers, associated definition, etc).
Thanks!
Post Reply