Always the same texture

i used a texture to add it to my terrain.

after this i use the following code to set the appearance of a fenggui item. but if i do that, also the texture of my terrain changes. why that?

 ITexture tex;
        Binding bind = Binding.getInstance();
            String filePath="jmetest/monkeymahjongg/images/Monkey.jpg";
            tex = bind.getTexture(filePath);            // Get the entire texture in the file
            Pixmap pixmap= new Pixmap(tex);               // Get the texture part we are interested of
            menubar.getAppearance().add(new PixmapBackground(pixmap, true));   // Add the texture to our container's background
        }catch (IOException e){
            logger.severe("Could not load UI texture");

Did you do an updateRenderState() on the terrain after you added the texture?

sounds like jme is inheriting FengGUI's texture settings.

you might try to invalidate the jme renderstates.

how do you render FengGUI and jme? in different GameStates or Passes or other ways ?

@alric: updateRenderState after terrain building or menu building?


thats my render method:

protected void render(float interpolation) {
      Renderer r = display.getRenderer();

its not so easy to get FengGUI working with jme.

its best to use separate renderstates.

but this at the beginning of the render loop helps:

      for (RenderState r : Renderer.defaultStateList) {



also this might be interesting: