Draw a geometry in front of everything

hey there,

i am using StandardGame and have a few GameStates. Most GameStates consist of multiple RenderPasses. At some point in my game, i need to draw a geometry that can be in any GameState and any RenderPass in front of EVERYTHING else (excluding ORTHO thingys  ;)).

How can i do that? What are my options?

thx in advance,


seems like u need an abstract parent game state or render pass for all of ur current game states and/or renderpasses. this will allow u to create this geometry object everytime u create a game state or renderpass. and if u only want a single copy of this obejct, u will need to make it a static variable or maybe passed it in from whichever object that is creating the render passes and game states.

and by in front, i think u meant the z order right? if so, setting the z order of that geometry should be fine.

sounds promising, thx neakor  :slight_smile:

Can't you just create a GameState of it's own and then add that gamestate to the manager last? Like you would do with FengGUI in a game state?

the problem with that is that the objects that have to 'come to the front' can be anywhere while the game is in its normal state. This means they have to be where they are … which can be anywhere.

Only at special occasions, they come to the front.

I think i will add a new GameState with the same SceneGraph (its not that big) but without the leaves (Geometries). Like that i can simultaneously manage the same translations, a.s.o and nothing is actually drawn in that new GameState. At these special occasions, i will just remove the wanted Geometry from the other SceneGraph and add it to the new one that has everything drawn in front.

so its a little combination of trussels and neakors approaches  :wink: