Is it allowed to create egl context from main() and render from another thread, given the fact that the context handles are passed from main() to the thread’s function?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, sure is.
First you need to create a context in in one thread:
Then in the other thread you create a shared context like this:
You will of course have to have some mutex/semaphores to sync any updates you want to do with GLES. For instance you need to do a
within the thread before the other thread can call
Then you can create textures, load shaders, etc. from either thread