Trying to create a new instance of BaseGame results in weird monochrome graphics

Hi,



I am working on a game which implements BaseGame - I know this is a bad idea but we were told to by our lecturer before we knew better, and we've got too far now to start again - even converting it over is proving impossible.



I've created a game manager which does the following:



MainGameTest game = new MainGameTest();

game.main("Easy");

game=null;



MainGameTest game2 = new MainGameTest();

game2.main("Intermediate");



However after the settings dialog box has appeared the second time, the in-game graphics are truly bizarre. Everything is loaded, models, textures, skybox, lighting etc… yet the entire scene is either exactly black [models] or exactly white [where the skybox should be] - no shading or lighting going on, or anything. HUD images appear black. I've tried absolutely everything, including moving the contents of start() out into the start game method in my game class, faffing around deep within the jME classes and am tearing my hair out. I even cloned the code of MainGameTest into MainGameTest2 and replaced the line



MainGameTest game2 = new MainGameTest();



with



MainGameTest2 game2 = new MainGameTest2();



but this had the same results.



Would be hugely hugely grateful if anyone can help with this!



Thanks,

Adam

First things that come to my mind:

  • clean() up the old BaseGame
  • clear the texture cache (TextureManager) - this should repair your textures.



    But I'm not sure about the lighting (shading)…