Author Topic: Texture loading questions  (Read 2019 times)

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Texture loading questions
« on: April 16, 2014, 10:02:50 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture loading questions
« Reply #1 on: April 16, 2014, 10:19:47 pm »
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)

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Texture loading questions
« Reply #2 on: April 16, 2014, 11:20:38 pm »
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.