www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kiffa on March 27, 2013, 01:53:02 pm

Title: RemoveAndUnload the texture, then reload and reassign it, seems useless.
Post by: kiffa on March 27, 2013, 01:53:02 pm
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.

Title: Re: RemoveAndUnload the texture, then reload and reassign it, seems useless.
Post by: EgonOlsen on March 27, 2013, 08:24:03 pm
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 (http://www.jpct.net/forum2/index.php/topic,3227.msg23523.html#msg23523)