Jump to content
  • Advertisement
Sign in to follow this  
genesys

OpenGL check if GLsync is signalled without gl API Call

This topic is 981 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The OpenGL wiki about GLsync objects (https://www.opengl.org/wiki/Sync_Object) states:

 

"Sync objects are never bound to the context, nor do they encapsulate state the way normal GL objects do. These are not OpenGL objects."

 

On Android it's possible to create a native sync from a EGLsync through the ANDROID_native_fence_sync extension which allows to check the state of the fence through a file descriptor (aparently under the hood the EGLsync on Android is implemented as a file descriptor).

 

These things make me believe that it should be perfectly possible to check the signaled state of a GLsync object without having to perform an API call.

The reason I am looking for such a way is because I want to check the signaled state of a GLsync on a worker thread and creating a second context for the worker thread solely to check the state of the sync feels overkill (plus, even though multiple contexts work fine with each other in theory, in the real world they seem to often cause obscure problems).

 

I am on windows, does anyone know a way to check the state of a GLsync without calling into the API?

Share this post


Link to post
Share on other sites
Advertisement

Can you just call glClientWaitSync without the current thread having an active context?

 

Thank you for  your help, Hodgman! I tried this, but get a GL_INVALID_OPERATION error

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!