Renderstates not cleaned up?


i've got a problem: i added a few new models to my game, and whenever they are rendered, they affect other models - their colors change (they aren't children of each other, so they don't inherit each others renderstate). i assume there are some renderstates not cleaned up. is this a bug, or do i have to set the renderstates of my nodes to override the states of the last rendered node?

I think I remember Renanse talking about some color bleeding, and he also mentioned that is it really in ten thousand ways the states could be not updated properly, ans he did some hack to cover up the bug, so that is what you might have to do…  ://

What states are you talking about?  The only remaining bleeding problem I'm aware of is materials that use front and back vs materials with just front/back.  Other bleeding issues are indicative of either A - not updating your renderstates or B - not telling jME to reset its view of opengl after a third party app (like fengui) has had its way with opengl.

:smiley: That must have been it… sorry for my fish memory

i'm only using jme (so it's not B) and i'm using the milkshape, 3ds and md2 importers hat jme offers. the bug disappears as soon as i remove specific models from the game. i only set and update the renderstates once (right after i've loaded them) - but even if i forgot to set or update them, they just should have no renderstates, not random ones, right?

is there a point where i could set a breakpoint and see what states are currently active?

If you forget to update them, they will bleed over, yes.

You should update them after attaching them to the live scene, not necessarily after loading, I have had that problem before…  :expressionless:

i've already been calling updteRenderState after adding them to the scene by accident - so that wasn't it.