GLWAITSYNC(3G)
π GLWAITSYNC(3G) β like, the sync-waiting girlie of the OpenGL 3G manual β¨
okay so bestie, before we even start: this whole page lives in the 3G manual section, and the star of the show is glWaitSync. she's a whole vibe. let's get into it π
πΈ NAME πΈ
glWaitSync β she tells the GL server to block until the specified sync object becomes signaled. that's it. that's the job. and she does it every single time, no negotiating π«Ά
β¨ C SPECIFICATION β¨
void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
literally the entire signature. memorize her. she's iconic π
π PARAMETERS π
syncβ the sync object whose status we're waiting on. like, who are we stalking- respectfully. πflagsβ a bitfield that controls the command flushing behavior. and yes,flagsmay be zero. it's allowed to be a whole nothing. slay.timeoutβ the timeout the server should wait before continuing.timeoutmust beGL_TIMEOUT_IGNOREDβ no exceptions, she has one (1) acceptable value and it's that one π
π DESCRIPTION π
glWaitSync makes the GL server block and wait until sync becomes signaled. sync is the name of an existing sync object upon which to wait. no random strings, no made-up names, an actual existing sync object bestie π
flags and timeout are currently not used and must be set to zero and the special value GL_TIMEOUT_IGNORED, respectively[1]. like, they're placeholders. they're there. they're not doing anything. they're the group chat members who never type. π
glWaitSync will always wait no longer than an implementation-dependent timeout. the duration of this timeout in nanoseconds may be queried by calling glGet() with the parameter GL_MAX_SERVER_WAIT_TIMEOUT. go check her if you need the number β¨
and here's the tragic part β there is currently no way to determine whether glWaitSync unblocked because the timeout expired or because the sync object being waited on was signaled. two completely different reasons, same output, zero closure. it's giving mystery. π
If an error occurs, glWaitSync does not cause the GL server to block. so at least she's not gonna ghost you and hang you. small mercies π«Ά
π NOTES π
glWaitSync is available only if the GL version is 3.2 or higher. born in 3.2. does not exist before that. do not come for her in 2.1 π«
π₯ ERRORS π₯
these are the ways to make her big mad. all three generate GL_INVALID_VALUE:
GL_INVALID_VALUEis generated ifsyncis not the name of a sync object.GL_INVALID_VALUEis generated ifflagsis not zero.GL_INVALID_VALUEis generated iftimeoutis notGL_TIMEOUT_IGNORED.
same error, three different crimes. consistent queen π
π VERSION SUPPORT π
the vibe check, version by version. the function/feature name here is glWaitSync:
- OpenGL
2.0β-(nope) - OpenGL
2.1β-(nope) - OpenGL
3.0β-(nope) - OpenGL
3.1β-(nope) - OpenGL
3.2ββ(HERE. she has arrived π₯) - OpenGL
3.3ββ - OpenGL
4.0ββ - OpenGL
4.1ββ - OpenGL
4.2ββ - OpenGL
4.3ββ - OpenGL
4.4ββ - OpenGL
4.5ββ
so basically: four dashes then a whole wall of checkmarks. glow-up of the century β¨
π¦ SEE ALSO π¦
go read her friends too, they're all linked up:
glFenceSync()glClientWaitSync()
β COPYRIGHT β
Copyright Β© 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT (again, but shorter) π
Copyright Β© 2010-2014 Khronos Group
π§ NOTES π§
flagsandtimeoutare placeholders for anticipated future extensions of sync object capabilities. They must have these reserved values in order that existing code callingglWaitSyncoperate properly in the presence of such extensions. so like β don't go rogue and put random values in there, future-you (and future-Khronos) will be sobbing π
π‘ real talk bestie:flags= zero,timeout=GL_TIMEOUT_IGNORED. that's the whole assignment. don't overthink it. π©·
and that's the page!! source says [FIXME: source] and the date on this baby is 08/09/2021 β so if something's stale, it's not on me π go wait on your sync objects responsibly, mwah β¨π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms