Texture loading questions

Started by Irony, April 16, 2014, 10:02:50 PM

Previous topic - Next topic

Irony

1. When I call addTexture from onDrawFrame() , does it block or will onDrawFrame continue?
2. When TextureManager.containsTexture returns true, is the texture already fully loaded?

If 1 and 2 are No, how can I check if a texture has been completely loaded?

EgonOlsen

The loading blocks. If the method returns, the texture has been loaded. That doesn't mean that it has been transfered to the gpu memory already. You can force this by using http://www.jpct.net/jpct-ae/doc/com/threed/jpct/TextureManager.html#preWarm(com.threed.jpct.FrameBuffer)

Irony

Thanks. I'm having a little trouble implementing a simple splash screen, but at least now I know it hasn't to do with any multithreading.