Z Buffer problem

Hi all,

I have a game that derives from SimpleGame. I have created a couple game states, one being the main menu state, the next being the main game state. The menu creates a fenggui menu that launches the main game state.

The problem I am having is that when I launch the menu state, then activate the main game state, all the quads get rendered improperly. I have a scene that is layered with quads, and it seems like it is just drawing the quads in order they are attached, taking no consideration for the zbuffer. It creates a blended look, where some parts of the quads are shown through parts of the other quads.

Something to note, if I create the men game state, attach it to the state manager, then instantly detach it, create the main game state, attach it, it renders properly. If I run the menu state at all is when I see the problem.

Any ideas?

Thanks

I thought you could only use game states with StandardGame.

Actually, I got it working a little while ago. I wasn't updating the render state of the main game's root node. Easy fix really, just hard to find.