102f4aeb0Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 202f4aeb0Sopenharmony_ci<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" 302f4aeb0Sopenharmony_ci "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> 402f4aeb0Sopenharmony_ci<refentry xml:base="" id="eglSwapInterval"> 502f4aeb0Sopenharmony_ci <refentryinfo> 602f4aeb0Sopenharmony_ci <copyright> 702f4aeb0Sopenharmony_ci <year>2003-2014</year> 802f4aeb0Sopenharmony_ci <holder>The Khronos Group Inc.</holder> 902f4aeb0Sopenharmony_ci </copyright> 1002f4aeb0Sopenharmony_ci </refentryinfo> 1102f4aeb0Sopenharmony_ci <refmeta> 1202f4aeb0Sopenharmony_ci <refentrytitle>eglSwapInterval</refentrytitle> 1302f4aeb0Sopenharmony_ci <manvolnum>3G</manvolnum> 1402f4aeb0Sopenharmony_ci </refmeta> 1502f4aeb0Sopenharmony_ci <refnamediv> 1602f4aeb0Sopenharmony_ci <refname>eglSwapInterval</refname> 1702f4aeb0Sopenharmony_ci <refpurpose> 1802f4aeb0Sopenharmony_ci specifies the minimum number of video frame periods 1902f4aeb0Sopenharmony_ci per buffer swap for the window associated with the current context. 2002f4aeb0Sopenharmony_ci </refpurpose> 2102f4aeb0Sopenharmony_ci </refnamediv> 2202f4aeb0Sopenharmony_ci <refsynopsisdiv> 2302f4aeb0Sopenharmony_ci <title>C Specification</title> 2402f4aeb0Sopenharmony_ci <funcsynopsis> 2502f4aeb0Sopenharmony_ci <funcprototype> 2602f4aeb0Sopenharmony_ci <funcdef>EGLBoolean <function>eglSwapInterval</function></funcdef> 2702f4aeb0Sopenharmony_ci <paramdef>EGLDisplay <parameter>display</parameter></paramdef> 2802f4aeb0Sopenharmony_ci <paramdef>EGLint <parameter>interval</parameter></paramdef> 2902f4aeb0Sopenharmony_ci </funcprototype> 3002f4aeb0Sopenharmony_ci </funcsynopsis> 3102f4aeb0Sopenharmony_ci </refsynopsisdiv> 3202f4aeb0Sopenharmony_ci <refsect1 id="parameters"><title>Parameters</title> 3302f4aeb0Sopenharmony_ci <variablelist> 3402f4aeb0Sopenharmony_ci <varlistentry> 3502f4aeb0Sopenharmony_ci <term><parameter>display</parameter></term> 3602f4aeb0Sopenharmony_ci <listitem> 3702f4aeb0Sopenharmony_ci <para> 3802f4aeb0Sopenharmony_ci Specifies the EGL display connection. 3902f4aeb0Sopenharmony_ci </para> 4002f4aeb0Sopenharmony_ci </listitem> 4102f4aeb0Sopenharmony_ci </varlistentry> 4202f4aeb0Sopenharmony_ci <varlistentry> 4302f4aeb0Sopenharmony_ci <term><parameter>interval</parameter></term> 4402f4aeb0Sopenharmony_ci <listitem> 4502f4aeb0Sopenharmony_ci <para> 4602f4aeb0Sopenharmony_ci Specifies the minimum number of video frames that are displayed before 4702f4aeb0Sopenharmony_ci a buffer swap will occur. 4802f4aeb0Sopenharmony_ci </para> 4902f4aeb0Sopenharmony_ci </listitem> 5002f4aeb0Sopenharmony_ci </varlistentry> 5102f4aeb0Sopenharmony_ci </variablelist> 5202f4aeb0Sopenharmony_ci </refsect1> 5302f4aeb0Sopenharmony_ci <refsect1 id="description"><title>Description</title> 5402f4aeb0Sopenharmony_ci <para> 5502f4aeb0Sopenharmony_ci The interval takes effect when <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry> is 5602f4aeb0Sopenharmony_ci first called subsequent to the <function>eglSwapInterval</function> call. 5702f4aeb0Sopenharmony_ci </para> 5802f4aeb0Sopenharmony_ci <para> 5902f4aeb0Sopenharmony_ci The <parameter>interval</parameter> specified by the function applies to the draw surface 6002f4aeb0Sopenharmony_ci bound to the context that is current on the calling thread. 6102f4aeb0Sopenharmony_ci </para> 6202f4aeb0Sopenharmony_ci <para> 6302f4aeb0Sopenharmony_ci If <parameter>interval</parameter> is set to a value of <constant>0</constant>, buffer swaps are not synchronized to a 6402f4aeb0Sopenharmony_ci video frame, and the swap happens as soon as the render is complete. interval 6502f4aeb0Sopenharmony_ci is silently clamped to minimum and maximum implementation dependent 6602f4aeb0Sopenharmony_ci valuesbefore being stored; these values are defined by <type>EGLConfig</type> attributes 6702f4aeb0Sopenharmony_ci <constant>EGL_MIN_SWAP_INTERVAL</constant> and <constant>EGL_MAX_SWAP_INTERVAL</constant> respectively. 6802f4aeb0Sopenharmony_ci </para> 6902f4aeb0Sopenharmony_ci </refsect1> 7002f4aeb0Sopenharmony_ci <refsect1 id="notes"><title>Notes</title> 7102f4aeb0Sopenharmony_ci <para> 7202f4aeb0Sopenharmony_ci The swap interval has no effect on <citerefentry><refentrytitle>eglCopyBuffers</refentrytitle></citerefentry>. 7302f4aeb0Sopenharmony_ci </para> 7402f4aeb0Sopenharmony_ci <para> 7502f4aeb0Sopenharmony_ci The default swap interval is 1. 7602f4aeb0Sopenharmony_ci </para> 7702f4aeb0Sopenharmony_ci </refsect1> 7802f4aeb0Sopenharmony_ci <refsect1 id="errors"><title>Errors</title> 7902f4aeb0Sopenharmony_ci <para> 8002f4aeb0Sopenharmony_ci <constant>EGL_FALSE</constant> is returned on failure, <constant>EGL_TRUE</constant> otherwise. 8102f4aeb0Sopenharmony_ci </para> 8202f4aeb0Sopenharmony_ci <para> 8302f4aeb0Sopenharmony_ci <constant>EGL_BAD_CONTEXT</constant> is generated if there is no current context 8402f4aeb0Sopenharmony_ci on the calling thread. 8502f4aeb0Sopenharmony_ci </para> 8602f4aeb0Sopenharmony_ci <para> 8702f4aeb0Sopenharmony_ci <constant>EGL_BAD_SURFACE</constant> is generated if there is no surface 8802f4aeb0Sopenharmony_ci bound to the current context. 8902f4aeb0Sopenharmony_ci </para> 9002f4aeb0Sopenharmony_ci </refsect1> 9102f4aeb0Sopenharmony_ci <refsect1 id="seealso"><title>See Also</title> 9202f4aeb0Sopenharmony_ci <para> 9302f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry> 9402f4aeb0Sopenharmony_ci </para> 9502f4aeb0Sopenharmony_ci </refsect1> 9602f4aeb0Sopenharmony_ci <refsect3 id="Copyright"><title></title> 9702f4aeb0Sopenharmony_ci <!-- Content included from copyright.inc.xsl --> 9802f4aeb0Sopenharmony_ci <imageobject> 9902f4aeb0Sopenharmony_ci <imagedata fileref="KhronosLogo.jpg" format="jpg" /> 10002f4aeb0Sopenharmony_ci </imageobject> 10102f4aeb0Sopenharmony_ci <para /> 10202f4aeb0Sopenharmony_ci </refsect3> 10302f4aeb0Sopenharmony_ci</refentry> 104