Display Problems with FengGui

Hello all together



I’m working on a little game and have encountered a problem today with my 3d-view of the world and the GUI part.



I’m using FengGui for my GUI. At the moment there are two GUI element visible and the world in the background.







Now I have implemented some code to change the map. After a map change the GUI looks like this:







The setup of the game is the following:


  • I use the BaseGame-Class

  • The game world is in a own GameState

  • The GUI is in another separate GameState



The map change is done through the following code:


/**
    * L

I have the same problem: my FengGUI interface displays with the last object's GLSL shader state…  :roll:



I think some openGL states is not clear to default state, and the Feng display engine doesn't update this state.



I've tried this tricks:



DisplaySystem.getDisplaySystem().getCurrentContext().clearCurrentStates();



DisplaySystem.updateStates(renderer);



DisplaySystem.getDisplaySystem().getCurrentContext().invalidateStates();



But nothing do something :confused:

I think some openGL states is not clear to default state, and the Feng display engine doesn't update this state.


This is also my thought. Any ideas which states that may be?

Is there a way for me to reproduce that problem in an easy way?

Johannes

You need to have the renderer reset all states to the defaults (Renderer.defaultStateList), clearCurrentStates() sets all states to null but it does not update them.



Try this hack:


for (RenderState rs: Renderer.defaultStateList){
    rs.apply();
}