• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <title xmlns:xlink="http://www.w3.org/1999/xlink">eglSwapInterval - EGL Reference Pages</title>
5    <link rel="stylesheet" type="text/css" href="khronos-man.css"/>
6    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/>
7  </head>
8  <body>
9    <header/>
10    <div class="refentry" id="eglSwapInterval">
11      <div class="titlepage"/>
12      <div class="refnamediv">
13        <h2>Name</h2>
14        <p>eglSwapInterval —
15            specifies the minimum number of video frame periods
16            per buffer swap for the window associated with the current context.
17        </p>
18      </div>
19      <div class="refsynopsisdiv">
20        <h2>C Specification</h2>
21        <div class="funcsynopsis">
22          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
23            <tr>
24              <td>
25                <code class="funcdef">EGLBoolean <strong class="fsfunc">eglSwapInterval</strong>(</code>
26              </td>
27              <td>EGLDisplay <var class="pdparam">display</var>, </td>
28            </tr>
29            <tr>
30              <td> </td>
31              <td>EGLint <var class="pdparam">interval</var><code>)</code>;</td>
32            </tr>
33          </table>
34          <div class="funcprototype-spacer"> </div>
35        </div>
36      </div>
37      <div class="refsect1" id="parameters">
38        <h2>Parameters</h2>
39        <div class="variablelist">
40          <dl class="variablelist">
41            <dt>
42              <span class="term">
43                <em class="parameter">
44                  <code>display</code>
45                </em>
46              </span>
47            </dt>
48            <dd>
49              <p>
50                        Specifies the EGL display connection.
51                    </p>
52            </dd>
53            <dt>
54              <span class="term">
55                <em class="parameter">
56                  <code>interval</code>
57                </em>
58              </span>
59            </dt>
60            <dd>
61              <p>
62                        Specifies the minimum number of video frames that are displayed before
63                        a buffer swap will occur.
64                    </p>
65            </dd>
66          </dl>
67        </div>
68      </div>
69      <div class="refsect1" id="description">
70        <h2>Description</h2>
71        <p>
72            The interval takes effect when <a class="citerefentry" href="eglSwapBuffers.xhtml"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a> is
73            first called subsequent to the <code class="function">eglSwapInterval</code> call.
74        </p>
75        <p>
76            The <em class="parameter"><code>interval</code></em> specified by the function applies to the draw surface
77            bound to the context that is current on the calling thread.
78        </p>
79        <p>
80            If <em class="parameter"><code>interval</code></em> is set to a value of <code class="constant">0</code>, buffer swaps are not synchronized to a
81            video frame, and the swap happens as soon as the render is complete. interval
82            is silently clamped to minimum and maximum implementation dependent
83            valuesbefore being stored; these values are defined by <span class="type">EGLConfig</span> attributes
84            <code class="constant">EGL_MIN_SWAP_INTERVAL</code> and <code class="constant">EGL_MAX_SWAP_INTERVAL</code> respectively.
85        </p>
86      </div>
87      <div class="refsect1" id="notes">
88        <h2>Notes</h2>
89        <p>
90            The swap interval has no effect on <a class="citerefentry" href="eglCopyBuffers.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCopyBuffers</span></span></a>.
91        </p>
92        <p>
93            The default swap interval is 1.
94        </p>
95      </div>
96      <div class="refsect1" id="errors">
97        <h2>Errors</h2>
98        <p>
99            <code class="constant">EGL_FALSE</code> is returned on failure, <code class="constant">EGL_TRUE</code> otherwise.
100        </p>
101        <p>
102            <code class="constant">EGL_BAD_CONTEXT</code> is generated if there is no current context
103            on the calling thread.
104        </p>
105        <p>
106            <code class="constant">EGL_BAD_SURFACE</code> is generated if there is no surface
107            bound to the current context.
108        </p>
109      </div>
110      <div class="refsect1" id="seealso">
111        <h2>See Also</h2>
112        <p>
113            <a class="citerefentry" href="eglSwapBuffers.xhtml"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a>
114        </p>
115      </div>
116      <p>
117    </p>
118      <div class="refsect3" id="copyright">
119        <img src="KhronosLogo.jpg"/>
120        <p>
121            Copyright © 2003-2014 The Khronos Group Inc.
122            Permission is hereby granted, free of charge, to any person obtaining a
123            copy of this software and/or associated documentation files (the
124            "Materials"), to deal in the Materials without restriction, including
125            without limitation the rights to use, copy, modify, merge, publish,
126            distribute, sublicense, and/or sell copies of the Materials, and to
127            permit persons to whom the Materials are furnished to do so, subject to
128            the condition that this copyright notice and permission notice shall be included
129            in all copies or substantial portions of the Materials.
130        </p>
131      </div>
132      <p>
133</p>
134    </div>
135    <footer/>
136  </body>
137</html>
138