File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -359,18 +359,26 @@ class WindowSceneImpl : public WindowScene
359
359
360
360
void setCompositors (const std::vector<String>& names)
361
361
{
362
- Viewport* vp = frameSrc->getViewport (0 );
363
362
CompositorManager& cm = CompositorManager::getSingleton ();
363
+ // this should be applied to all owned render targets
364
+ Ogre::RenderTarget* targets[] = {frameSrc, rWin, depthRTT};
364
365
365
- cm.removeCompositorChain (vp); // remove previous configuration
366
-
367
- for (size_t i = 0 ; i < names.size (); i++)
366
+ for (int j = 0 ; j < 3 ; j++)
368
367
{
369
- if (!cm.addCompositor (vp, names[i])) {
370
- LogManager::getSingleton ().logError (" Failed to add compositor: " + names[i]);
371
- continue ;
368
+ Ogre::RenderTarget* tgt = targets[j];
369
+ if (!tgt || (frameSrc == rWin && tgt == rWin)) continue ;
370
+
371
+ Viewport* vp = tgt->getViewport (0 );
372
+ cm.removeCompositorChain (vp); // remove previous configuration
373
+
374
+ for (size_t i = 0 ; i < names.size (); i++)
375
+ {
376
+ if (!cm.addCompositor (vp, names[i])) {
377
+ LogManager::getSingleton ().logError (" Failed to add compositor: " + names[i]);
378
+ continue ;
379
+ }
380
+ cm.setCompositorEnabled (vp, names[i], true );
372
381
}
373
- cm.setCompositorEnabled (vp, names[i], true );
374
382
}
375
383
}
376
384
You can’t perform that action at this time.
0 commit comments