098ea3b58f85fd3a82ce7e1605a5b2a05c3755a8
[clinton/guile-figl.git] / upstream-man-pages / man3 / glFenceSync.xml
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="glFenceSync">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glFenceSync</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glFenceSync</refname>
17 <refpurpose>create a new sync object and insert it into the GL command stream</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>GLsync <function>glFenceSync</function></funcdef>
23 <paramdef>GLenum <parameter>condition</parameter></paramdef>
24 <paramdef>GLbitfield <parameter>flags</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 </refsynopsisdiv>
28 <!-- eqn: ignoring delim $$ -->
29 <refsect1 id="parameters"><title>Parameters</title>
30 <variablelist>
31 <varlistentry>
32 <term><parameter>condition</parameter></term>
33 <listitem>
34 <para>
35 Specifies the condition that must be met to set the sync object's state to signaled. <parameter>condition</parameter>
36 must be <constant>GL_SYNC_GPU_COMMANDS_COMPLETE</constant>.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>flags</parameter></term>
42 <listitem>
43 <para>
44 Specifies a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined
45 for this operation and <parameter>flags</parameter> must be zero.<footnote><para>
46 <parameter>flags</parameter> is a placeholder for anticipated future extensions of fence sync object capabilities.
47 </para>
48 </footnote>
49 </para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsect1>
54 <refsect1 id="description"><title>Description</title>
55 <para>
56 <function>glFenceSync</function> creates a new fence sync object, inserts a fence command into the GL command stream and
57 associates it with that sync object, and returns a non-zero name corresponding to the sync object.
58 </para>
59 <para>
60 When the specified <parameter>condition</parameter> of the sync object is satisfied by the fence command, the sync object
61 is signaled by the GL, causing any <citerefentry><refentrytitle>glWaitSync</refentrytitle></citerefentry>,
62 <citerefentry><refentrytitle>glClientWaitSync</refentrytitle></citerefentry> commands blocking in <parameter>sync</parameter>
63 to <emphasis>unblock</emphasis>. No other state is affected by <function>glFenceSync</function> or by the execution
64 of the associated fence command.
65 </para>
66 <para>
67 <parameter>condition</parameter> must be <constant>GL_SYNC_GPU_COMMANDS_COMPLETE</constant>. This condition is satisfied by
68 completion of the fence command corresponding to the sync object and all preceding commands in the same command stream.
69 The sync object will not be signaled until all effects from these commands on GL client and server state and the
70 framebuffer are fully realized. Note that completion of the fence command occurs once the state of the corresponding sync
71 object has been changed, but commands waiting on that sync object may not be unblocked until after the fence command completes.
72 </para>
73 </refsect1>
74 <refsect1 id="notes"><title>Notes</title>
75 <function>glFenceSync</function> is only supported if the GL version is 3.2 or greater, or if
76 the <code>ARB_sync</code> extension is supported.
77 </refsect1>
78 <refsect1 id="errors"><title>Errors</title>
79 <para>
80 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>condition</parameter> is not
81 <constant>GL_SYNC_GPU_COMMANDS_COMPLETE</constant>.
82 </para>
83 <para>
84 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>flags</parameter> is not zero.
85 </para>
86 <para>
87 Additionally, if <function>glFenceSync</function> fails, it will return zero.
88 </para>
89 </refsect1>
90 <refsect1 id="seealso"><title>See Also</title>
91 <para>
92 <citerefentry><refentrytitle>glDeleteSync</refentrytitle></citerefentry>,
93 <citerefentry><refentrytitle>glGetSync</refentrytitle></citerefentry>,
94 <citerefentry><refentrytitle>glWaitSync</refentrytitle></citerefentry>,
95 <citerefentry><refentrytitle>glClientWaitSync</refentrytitle></citerefentry>
96 </para>
97 </refsect1>
98 <refsect1 id="Copyright"><title>Copyright</title>
99 <para>
100 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
101 This material may be distributed subject to the terms and conditions set forth in
102 the Open Publication License, v 1.0, 8 June 1999.
103 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
104 </para>
105 </refsect1>
106 </refentry>