Hi!
When you call addWorkspace there is a parameter to specify one or multiple TextureGpu as "external" targets.
Later inside the compositor your workspace and nodes will define what they do with these external targets (usually its because either you want to render to them; or because its a temporary target you want to share with all workspaces to save memory)
e.g.
Code: Select all
compositorManager->addWorkspace( mSceneManager, mRenderWindow->getTexture(), mCamera, workspaceName, true )
As for "how it's associated" depends on what you do. You could for example create a workspace definition that renders to multiple render windows at once (IMHO that would be crazy but that's up to you). Multiple workspaces may also draw to the same Render Window if you want (I never tried that though, I suspect it could have issues in Vulkan?) e.g.
Code: Select all
CompositorChannelVec externalTagets;
externalTagets.push_back( window0->getTexture() );
externalTagets.push_back( window1->getTexture() );
externalTagets.push_back( window2->getTexture() );
compositorManager->addWorkspace( mSceneManager, externalTagets, mCamera, workspaceName, true )
or you could do 1 workspace per window.
So it's not so much that as that you tell "a Render Window to have a CompositorWorkspace associated to it" but rather you grabbed a CompositorWorkspace and told it to output into the TextureGpu associated with that window.
For more info see
the Compositor section.