Texture Error

Hey there,



I have a problem with my textures. I copied a method for generating random terrains, but the result is as follows:



looks like UTF-8 chars!



This is the source:


        MidPointHeightMap heightMap = new MidPointHeightMap(64, 1f);
        Vector3f terrainScale = new Vector3f(20, 0.5f, 20);
        terrain = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,
                        heightMap.getHeightMap(), new Vector3f(0, 0, 0));

        terrain.setModelBound(new BoundingBox());
        terrain.updateModelBound();

       
        ProceduralTextureGenerator pt = new ProceduralTextureGenerator(heightMap);
        pt.addTexture(new ImageIcon("texture/dirt.jpg"), -128, 0, 128);
        pt.addTexture(new ImageIcon("texture/grassb.png"), 0, 128, 255);
        pt.addTexture(new ImageIcon("texture/highest.jpg"), 128, 255, 384);
        pt.createTexture(128);

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
        ts.setEnabled(true);
        Texture t1 = TextureManager.loadTexture(pt.getImageIcon().getImage(),
        Texture.MinificationFilter.Trilinear,
        Texture.MagnificationFilter.Bilinear, true);
        ts.setTexture(t1, 0);
       
        rootNode.attachChild(terrain);
       
        terrain.setRenderState(ts);


For all three files File.exists() says true.
I'm working with NetBeans on Ubuntu 64bit.

i think u need to call updateRenderstate on your terrain

Thanks! thats it!