Tutorial 5 Comment & Question

geerzo

08-12-2006 06:04:00

Let me start by saying how nice Mogre really is. I've been reading about Ogre for quite a while now but haven't written too much with it since my C++ is really poor. My C# on the other hand isn't bad so I'm much more comfortable with Mogre. Thanks for making this available.

On tutorial 5 there seems to be an error where a call to CreateScene() is left out of the Go() method. I looked at the downloadable source and the call is in there but it was left off of the tutorial proper.

When doing the tutorial I missed the fact that it was missing at first which actually caused an interesting situation for me. When I launched my application, with no CreateScene being called, there was still a scene rendered to the screen. After realizing my mistake I added in the call and ran it and the correct scene was rendered. Playing around with it, if I comment out all of the logic in the CreateScene (except the FrameListener) and run my application, the last scene rendered is displayed. It's almost like it's left in the video memory and never cleared.

I tried changing D3D settings. I tried rendering with OpenGL. I tried restarting my development environment. All gave me the same ghost image (although the opengl one was all screwed up). I never seemed to have this issue with my C++ examples.

Could this be because something is not being destroyed properly? Is this a problem with Ogre in general? Is this something unique to the Mogre bindings?

Bekas

08-12-2006 09:32:39

You need to add a viewport to the render window, otherwise "garbage" will be rendered. It's not a bug, it's the Ogre design, render windows get updated/cleared through viewports.

geerzo

08-12-2006 16:33:44

That makes sense. That would also explain why I didn't have the problem previously since the viewport was being added just no scene being drawn.

Thanks.