Commit 064603ad authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1748 from paroj:ovis_texup

parents 386f52c7 f9bef184
...@@ -359,18 +359,26 @@ public: ...@@ -359,18 +359,26 @@ public:
void setCompositors(const std::vector<String>& names) void setCompositors(const std::vector<String>& names)
{ {
Viewport* vp = frameSrc->getViewport(0);
CompositorManager& cm = CompositorManager::getSingleton(); CompositorManager& cm = CompositorManager::getSingleton();
// this should be applied to all owned render targets
Ogre::RenderTarget* targets[] = {frameSrc, rWin, depthRTT};
cm.removeCompositorChain(vp); // remove previous configuration for(int j = 0; j < 3; j++)
for(size_t i = 0; i < names.size(); i++)
{ {
if (!cm.addCompositor(vp, names[i])) { Ogre::RenderTarget* tgt = targets[j];
LogManager::getSingleton().logError("Failed to add compositor: " + names[i]); if(!tgt || (frameSrc == rWin && tgt == rWin)) continue;
continue;
Viewport* vp = tgt->getViewport(0);
cm.removeCompositorChain(vp); // remove previous configuration
for(size_t i = 0; i < names.size(); i++)
{
if (!cm.addCompositor(vp, names[i])) {
LogManager::getSingleton().logError("Failed to add compositor: " + names[i]);
continue;
}
cm.setCompositorEnabled(vp, names[i], true);
} }
cm.setCompositorEnabled(vp, names[i], true);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment