blah.setTexture(TextureManager.loadTexture(TestTerrain.class.getClassLoader().getResource("jmetest/data/images/Monkey.jpg"), Texture.MM_LINEAR, Texture.MM_LINEAR, false));
  protected void simpleInitGame() {    display.setTitle("Terrain Test");    input.setKeySpeed(50f);    cam.setLocation(new Vector3f(64*5, 250, 64*5));    cam.update();    FogState fs = display.getRenderer().getFogState();    fs.setEnabled(false);    rootNode.setRenderState(fs);    CullState cs = display.getRenderer().getCullState();    cs.setCullMode(CullState.CS_BACK);    cs.setEnabled(true);    lightState.setTwoSidedLighting(true);    MidPointHeightMap heightMap = new MidPointHeightMap(128, 1.9f);    Vector3f terrainScale = new Vector3f(5,1,5);    TerrainBlock tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,                                       heightMap.getHeightMap(),                                       new Vector3f(0, 0, 0), false);    tb.setDetailTexture(1, 4);    tb.setModelBound(new BoundingBox());    tb.updateModelBound();    tb.setLocalTranslation(new Vector3f(10,10,10));    rootNode.attachChild(tb);    rootNode.setRenderState(cs);    ProceduralTextureGenerator pt = new ProceduralTextureGenerator(        heightMap);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/grassb.png")),                  -128, 0, 128);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/dirt.jpg")),                  0, 128, 255);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/highest.jpg")),                  128, 255,                  384);    pt.createTexture(512);    TextureState ts = display.getRenderer().getTextureState();    ts.setEnabled(true);    Texture t1 = TextureManager.loadTexture(pt.getImageIcon().getImage(),                                            Texture.MM_LINEAR,                                            Texture.FM_LINEAR, true, true);    ts.setTexture(t1, 0);    Texture t2 = TextureManager.loadTexture(TestTerrain.class                                            .getClassLoader()                                            .getResource(        "jmetest/data/texture/Detail.jpg"),                                            Texture.MM_LINEAR,                                            Texture.FM_LINEAR, true);        TextureState blah = display.getRenderer().getTextureState();    blah.setTexture(TextureManager.loadTexture(TestTerrain.class.getClassLoader().getResource("jmetest/data/images/Monkey.jpg"), Texture.MM_LINEAR, Texture.MM_LINEAR, false));    blah.setEnabled(true);    for(int i = 0; i < 100; i++) {        Sphere s = new Sphere("Sphere" + i, 10, 10, 2);        s.setRenderState(blah);        float randX = (float)Math.random() * 100 * terrainScale.x + 10;        float randZ = (float)Math.random() * 100 * terrainScale.z + 10;        s.setLocalTranslation(new Vector3f(randX, tb.getHeight(randX, randZ), randZ));        s.setModelBound(new BoundingBox());        s.updateModelBound();        rootNode.attachChild(s);            }        ts.setTexture(t2, 1);    t2.setWrap(Texture.WM_WRAP_S_WRAP_T);    t1.setApply(Texture.AM_COMBINE);    t1.setCombineFuncRGB(Texture.ACF_MODULATE);    t1.setCombineSrc0RGB(Texture.ACS_TEXTURE);    t1.setCombineOp0RGB(Texture.ACO_SRC_COLOR);    t1.setCombineSrc1RGB(Texture.ACS_PRIMARY_COLOR);    t1.setCombineOp1RGB(Texture.ACO_SRC_COLOR);    t1.setCombineScaleRGB(0);    t2.setApply(Texture.AM_COMBINE);    t2.setCombineFuncRGB(Texture.ACF_ADD_SIGNED);    t2.setCombineSrc0RGB(Texture.ACS_TEXTURE);    t2.setCombineOp0RGB(Texture.ACO_SRC_COLOR);    t2.setCombineSrc1RGB(Texture.ACS_PREVIOUS);    t2.setCombineOp1RGB(Texture.ACO_SRC_COLOR);    t2.setCombineScaleRGB(0);    rootNode.setRenderState(ts);  }