jPCT-AE - a 3d engine for Android > Support

RemoveAndUnload the texture, then reload and reassign it, seems useless.

(1/1)

kiffa:
removeAndUnload() the texture, then reload the texture, the obj seems still rendering with the dummy texture:


--- Code: ---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");


--- End code ---

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

EgonOlsen:
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

Navigation

[0] Message Index

Go to full version