Reminder on Problem with a compositor/multiples viewports

Minor issues with the Ogre API that can be trivial to fix
User avatar
Olganix
Halfling
Posts: 41
Joined: Thu Nov 06, 2008 4:18 pm

Reminder on Problem with a compositor/multiples viewports

Post by Olganix »

Hi. I'm not sure about talk of this in papercuts.
this week, I fall on this bug (after I found a solution for me):
http://www.ogre3d.org/forums/viewtopic. ... r+#p318318

I passed 2h00 on this bug because I use ColourValue(0,0,0,1) instead of (0,0,0,0) on a setBackgroundColour of a viewport :evil: .
The result to the bug is to have one copy of the original material (on a compositor) by frame. The cause is, in CompositorChain::preViewportUpdate(), the condition (pass->getClearColour() != mViewport->getBackgroundColour()) was always true same as (pass->setClearColour(mViewport->getBackgroundColour());).

To be exact on the condition: for me, the problem appear when I add a compositor on a second viewport (fist is inactive, because I temporary want use another way to render my scene) and when the rendertarget of my viewports is used by another compositor to compose with another scene.
note: I try setClearEveryFrame(false); and true, no change.

hope, someone could fix this, or resolve the problem by forcing the background color of the viewport in this case.

(sorry for my english )