|
|
|
@ -359,9 +359,16 @@ public: |
|
|
|
|
|
|
|
|
|
void setCompositors(const std::vector<String>& names) |
|
|
|
|
{ |
|
|
|
|
Viewport* vp = frameSrc->getViewport(0); |
|
|
|
|
CompositorManager& cm = CompositorManager::getSingleton(); |
|
|
|
|
// this should be applied to all owned render targets
|
|
|
|
|
Ogre::RenderTarget* targets[] = {frameSrc, rWin, depthRTT}; |
|
|
|
|
|
|
|
|
|
for(int j = 0; j < 3; j++) |
|
|
|
|
{ |
|
|
|
|
Ogre::RenderTarget* tgt = targets[j]; |
|
|
|
|
if(!tgt || (frameSrc == rWin && tgt == rWin)) continue; |
|
|
|
|
|
|
|
|
|
Viewport* vp = tgt->getViewport(0); |
|
|
|
|
cm.removeCompositorChain(vp); // remove previous configuration
|
|
|
|
|
|
|
|
|
|
for(size_t i = 0; i < names.size(); i++) |
|
|
|
@ -373,6 +380,7 @@ public: |
|
|
|
|
cm.setCompositorEnabled(vp, names[i], true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void setBackground(const Scalar& color) |
|
|
|
|
{ |
|
|
|
|