Author Topic: RemoveAndUnload the texture, then reload and reassign it, seems useless.  (Read 1655 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
removeAndUnload() the texture, then reload the texture, the obj seems still rendering with the dummy texture:

Code: [Select]
car.setTexture("car");

TextureManager.getInstance().removeAndUnload("car", getFrameBuffer());

Texture t = new Texture(in, false);
TextureManager.getInstance().addTexture("car", t);
TextureManager.getInstance().prewarm(getFrameBuffer());
car.setTexture("car");


And if i don't remveAndUnload, just replace it, the result is correct.

« Last Edit: March 27, 2013, 01:57:56 pm by kiffa »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
No, it's not useless. It just doesn't do what you expect it to do. Here's a little explanation why: http://www.jpct.net/forum2/index.php/topic,3227.msg23523.html#msg23523