1<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:base="" xml:id="eglSwapInterval"> 2 <info> 3 <copyright> 4 <year>2003-2014</year> 5 <holder>The Khronos Group Inc.</holder> 6 </copyright> 7 </info> 8 <refmeta> 9 <refentrytitle>eglSwapInterval</refentrytitle> 10 <manvolnum>3G</manvolnum> 11 </refmeta> 12 <refnamediv> 13 <refname>eglSwapInterval</refname> 14 <refpurpose> 15 specifies the minimum number of video frame periods 16 per buffer swap for the window associated with the current context. 17 </refpurpose> 18 </refnamediv> 19 <refsynopsisdiv> 20 <title>C Specification</title> 21 <funcsynopsis> 22 <funcprototype> 23 <funcdef>EGLBoolean <function>eglSwapInterval</function></funcdef> 24 <paramdef>EGLDisplay <parameter>display</parameter></paramdef> 25 <paramdef>EGLint <parameter>interval</parameter></paramdef> 26 </funcprototype> 27 </funcsynopsis> 28 </refsynopsisdiv> 29 <refsect1 xml:id="parameters"><title>Parameters</title> 30 <variablelist> 31 <varlistentry> 32 <term><parameter>display</parameter></term> 33 <listitem> 34 <para> 35 Specifies the EGL display connection. 36 </para> 37 </listitem> 38 </varlistentry> 39 <varlistentry> 40 <term><parameter>interval</parameter></term> 41 <listitem> 42 <para> 43 Specifies the minimum number of video frames that are displayed before 44 a buffer swap will occur. 45 </para> 46 </listitem> 47 </varlistentry> 48 </variablelist> 49 </refsect1> 50 <refsect1 xml:id="description"><title>Description</title> 51 <para> 52 The interval takes effect when <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry> is 53 first called subsequent to the <function>eglSwapInterval</function> call. 54 </para> 55 <para> 56 The <parameter>interval</parameter> specified by the function applies to the draw surface 57 bound to the context that is current on the calling thread. 58 </para> 59 <para> 60 If <parameter>interval</parameter> is set to a value of <constant>0</constant>, buffer swaps are not synchronized to a 61 video frame, and the swap happens as soon as the render is complete. interval 62 is silently clamped to minimum and maximum implementation dependent 63 valuesbefore being stored; these values are defined by <type>EGLConfig</type> attributes 64 <constant>EGL_MIN_SWAP_INTERVAL</constant> and <constant>EGL_MAX_SWAP_INTERVAL</constant> respectively. 65 </para> 66 </refsect1> 67 <refsect1 xml:id="notes"><title>Notes</title> 68 <para> 69 The swap interval has no effect on <citerefentry><refentrytitle>eglCopyBuffers</refentrytitle></citerefentry>. 70 </para> 71 <para> 72 The default swap interval is 1. 73 </para> 74 </refsect1> 75 <refsect1 xml:id="errors"><title>Errors</title> 76 <para> 77 <constant>EGL_FALSE</constant> is returned on failure, <constant>EGL_TRUE</constant> otherwise. 78 </para> 79 <para> 80 <constant>EGL_BAD_CONTEXT</constant> is generated if there is no current context 81 on the calling thread. 82 </para> 83 <para> 84 <constant>EGL_BAD_SURFACE</constant> is generated if there is no surface 85 bound to the current context. 86 </para> 87 </refsect1> 88 <refsect1 xml:id="seealso"><title>See Also</title> 89 <para> 90 <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry> 91 </para> 92 </refsect1> 93 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/> 94</refentry> 95