Problems with Textures in engine-reinit

Hi!

I have a Swing gui that calls my jME main class(that extends SimpleGame).

When I press ESC I don't want the application to exit(just want to close jME popup),

so I overrode quit() in this way:



protected void quit() {
        if (display != null){
           display.close();
        }
         this.cleanup();
    
   }



Btw if I restart the jME popup from the GUI , the texture rendering fails.
I checked that paths to textures are correct and that TextureStates are created as well.
Do u know what's happening?

You probably did not clean out the old cached textures in TextureManager, so the old ids are pulled and reused.  Try calling TextureManager.clearCache() in your cleanup or somewhere similar.

Thank you renanse; I'm gonna try!



I'll insert you, mojo and some other in the special thanks at my thesis presentation! Can I ?

I'm not kiddin'  :smiley:

Wow: it works!!

I'm impressed  :mrgreen:



Thank you very much  :smiley:

Great, np  :slight_smile:

I'll send you the presentation so:

it will be on 21st December!

:slight_smile:



p.s. 3 posts to Jr. Member  :smiley: