Texture loading broken since 1.0?

the following code

private static Spatial loadMD2(final String p_file,
     final String p_texture,
     final DisplaySystem p_display
  )
     throws IOException {
    final Md2ToJme l_conv = new Md2ToJme();
    final Spatial l_spatial = Utils.asJME(l_conv, p_file, Utils.getImage(p_texture), p_display, CullState.CS_FRONT);
    l_spatial.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.HALF_PI, Vector3f.UNIT_Y));
    return l_spatial;
  }


  private static Spatial asJME(final FormatConverter p_conv,
     final String p_file,
     final Image p_image,
     final DisplaySystem p_display, final int p_cullstate) throws IOException {
    assert p_image!=null;
    FileInputStream l_stream = null;
    final ByteArrayOutputStream l_baos = new ByteArrayOutputStream();
    try {
      l_stream = new FileInputStream(Utils.getFile(p_file));
      p_conv.convert(l_stream, l_baos);
    } finally {
      if (l_stream != null) {
        l_stream.close();
      }
    }
    final Node l_node = (Node) new BinaryImporter().load(l_baos.toByteArray());
      final TextureState ts = p_display.getRenderer().createTextureState();
      ts.setEnabled(true);
      ts.setTexture(
         TextureManager.loadTexture(
            p_image,
            Texture.MM_LINEAR_LINEAR,
            Texture.FM_LINEAR,
            true));
      l_node.setRenderState(ts);
      l_node.updateRenderState();

    final CullState cs = p_display.getRenderer().createCullState();
    cs.setCullMode(p_cullstate);
    l_node.setRenderState(cs);
    return l_node;
  }



worked fine until i upgraded to jme 1.0. do i have to change anything?

the md2 loading test works, loading other models work, just md2s inside my game are broken - the textures are not used, all models are grey

are you using ResourceLocator?

It'd be great if the online javadocs were updated for this (ie TextureKey.setOverridingLocation no longer existing - took me a while today to figure that out)



That being said - ResourceLocator is awesome!

yes for 3ds and ms3d-models.

no for md2 because i load the texture myself. should i do it anyway?

no, didn't help at all. any ideas?