load textures into a thread blocks the mainUI in a

2019-08-05 08:24发布

问题:

I try to load bitmaps and display them into textures (openglES2.0). I make a runnable thread, and once loaded the bitmap are sent to textures. Even my thread is runnable, the main UI Thread freezes for a while during the loading of pictures. I really don't understand this and am pretty lost about it… any clues ?

回答1:

Sounds like you're calling myThread.run() instead of myThread.start()

run() executes in the calling thread, but start() makes a new thread and then calls run inside of that.

If that's not the case, I can't really help you without your relevant code.