Hi,
Hi Madan,
Unfortunately, we don’t provide a library for threading.
If you want to add threading to your applications, it’s best for performance to have a single thread for your rendering that calls all of your GL functions, including functions for loading textures, shaders etc.
Thanks,
Joe
Thanks for the reply Joe !!
Hi Madan,
I’m not sure if threading behaves the same way on the two OSs. It would be best to refer to the iOS and Android documentation for this information.
Unless your rendering thread is being blocked by other CPU work (e.g. handling network connections) or CPU workload is the bottleneck, then using multiple threads is unlikely to improve the responsiveness of your UI. Have you tried running PVRTune on your target Android device/s?
…and yes, Joe is entirely correct. Threading does not automatically mean a performance boost, sometimes the overhead of all the locking and unlocking etc, never mind the debugging time. can cost more than you gain, so before you do that, try running Tune on your device to see if you need it at all.
You should also be aware that GL contexts are entirely thread-specific. You can use functionality such as share groups to share GL objects across threads, however. This is quite API specific: on iOS EAGLContext contains functionality for retrieving and setting share group properties and on Android I believe the various EGL functions such as eglCreateContext are used to do the same.