eglCreatePbufferFromClientBuffer and Threads

After reading the documentation about eglCreatePbufferFromClientBuffer there is something that I still scratch my head about:

Is it legal to use a VGImge-handle created in a different thread as an argument for eglCreatePbufferFromClientBuffer?

Thanks,
Nils

That’s a really interesting question, and one I thank you for raising. We may have overlooked something here in that without a VG context to validate a handle against, it’s difficult to know which context(s) it belongs to. I’m going to take this one off to the VG working group.

Thanks for answering, Jon.

So far I’ve “solved” the problem by using the upper 6 bits of my handle to identify the openvg context it belongs to. I can now have up to 64 contexts running on a system before this counter overflows and I run into the risk of a context/image/thread mismatch.

It’s a dirty hack that solves the problem for most applications (e.g. those who never create more than 64 contexts).

Somehow I have the feeling I’m the first one who implements OpenVG/EGL with all these features on a multithreading environment :slight_smile:

Nils