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