Black Background on Second Opening of Child Render Window


08-08-2012 11:18:13

I have inherited a mogre project and am still new to the framework.

I'm trying to resolve an issue: There are two render windows (main and child). The child render window is created on demand when the user clicks a certain button.

The first time the window is opened - no problem. There is a grey background with an object in the center of the screen (I have tried to upload an attachment, but received an error message) The second time the window is opened, the background is black, the object is still rendered as expected in the middle/foreground. What is happening?

Thanks for any help!



08-08-2012 11:39:56

There is a property on the Viewport called BackgroundColour. It's probably being set (or not set) somewhere when the window is created the second time.

Look for lines in the code that do something like this perhaps.
_viewport.BackgroundColour = ColourValue.Black;


08-08-2012 13:31:15

Thank you for your reply.

Although this did not resolve the issue - it did give me a bit more insight. It turns out that the problem is with the skybox. If I turn off the skybox completely, the background consistently has the same appearance as when the issue is occurring.

I cannot see any obvious issues with the skybox updates. In fact, when I debug slowly, the issue sometimes doesn't appear until the third of fourth time the window opens.