1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glClientWaitSync">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glClientWaitSync
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glClientWaitSync
</refname>
17 <refpurpose>block and wait for a sync object to become signaled
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>GLenum
<function>glClientWaitSync
</function></funcdef>
23 <paramdef>GLsync
<parameter>sync
</parameter></paramdef>
24 <paramdef>GLbitfield
<parameter>flags
</parameter></paramdef>
25 <paramdef>GLuint64
<parameter>timeout
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>sync
</parameter></term>
35 The sync object whose status to wait on.
40 <term><parameter>flags
</parameter></term>
43 A bitfield controlling the command flushing behavior.
<parameter>flags
</parameter> may be
<constant>GL_SYNC_FLUSH_COMMANDS_BIT
</constant>.
49 <term><parameter>timeout
</parameter></term>
52 The timeout, specified in nanoseconds, for which the implementation should wait for
<parameter>sync
</parameter> to become signaled.
57 <refsect1 id=
"description"><title>Description
</title>
59 <function>glClientWaitSync
</function> causes the client to block and wait for the sync object specified by
<parameter>sync
</parameter> to become signaled. If
60 <parameter>sync
</parameter> is signaled when
<function>glClientWaitSync
</function> is called,
<function>glClientWaitSync
</function> returns immediately, otherwise
61 it will block and wait for up to
<parameter>timeout
</parameter> nanoseconds for
<parameter>sync
</parameter> to become signaled.
64 The return value is one of four status values:
68 <constant>GL_ALREADY_SIGNALED
</constant> indicates that
<parameter>sync
</parameter> was signaled at the time that
<function>glClientWaitSync
</function>
74 <constant>GL_TIMEOUT_EXPIRED
</constant> indicates that at least
<parameter>timeout
</parameter> nanoseconds passed and
<parameter>sync
</parameter> did not
80 <constant>GL_CONDITION_SATISFIED
</constant> indicates that
<parameter>sync
</parameter> was signaled before the timeout expired.
85 <constant>GL_WAIT_FAILED
</constant> indicates that an error occurred. Additionally, an OpenGL error will be generated.
91 <refsect1 id=
"notes"><title>Notes
</title>
93 <function>glClientWaitSync
</function> is available only if the GL version is
3.2 or greater.
96 <refsect1 id=
"errors"><title>Errors
</title>
98 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>sync
</parameter> is not the name of an existing sync object.
101 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>flags
</parameter> contains any unsupported flag.
104 <refsect1 id=
"seealso"><title>See Also
</title>
106 <citerefentry><refentrytitle>glFenceSync
</refentrytitle></citerefentry>,
107 <citerefentry><refentrytitle>glIsSync
</refentrytitle></citerefentry>
108 <citerefentry><refentrytitle>glWaitSync
</refentrytitle></citerefentry>
111 <refsect1 id=
"Copyright"><title>Copyright
</title>
113 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
114 This material may be distributed subject to the terms and conditions set forth in
115 the Open Publication License, v
1.0,
8 June
1999.
116 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.