Tizen, draw OpenGL textures in a working thread

273 views Asked by At

I have to generate openGL textures at run time on Tizen Native.

It's not a solution for me to draw them in the UI thread as it can take some time. So I am trying to draw them in a working thread but it seems it's not possible: CanvasTexture must be created and drawn in the UI thread or it crashes!

What other solutions do I have ?

Maybe to use glTexImage2D(..., void* pixels) but I can't find a way to create and draw in a memory buffer using high level functions (text, shapes, and images), and maybe it should also use the UI thread...

Has someone a solution?

1

There are 1 answers

0
Kyu_ On BEST ANSWER

The UI and Graphics namespace APIs are not thread-safe. If you need to offload some tasks, create a worker thread to perform functions, such as downloading data, decoding images, and playing sound, but handle all the UI controls in the main thread.