• 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">eglBindAPI - EGL Reference Pages</title>
5    <link rel="stylesheet" type="text/css" href="khronos-man.css"/>
6    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/>
7  </head>
8  <body>
9    <header/>
10    <div class="refentry" id="eglBindAPI">
11      <div class="titlepage"/>
12      <div class="refnamediv">
13        <h2>Name</h2>
14        <p>eglBindAPI — Set the current rendering API</p>
15      </div>
16      <div class="refsynopsisdiv">
17        <h2>C Specification</h2>
18        <div class="funcsynopsis">
19          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
20            <tr>
21              <td>
22                <code class="funcdef">EGLBoolean <strong class="fsfunc">eglBindAPI</strong>(</code>
23              </td>
24              <td>EGLenum <var class="pdparam">api</var><code>)</code>;</td>
25            </tr>
26          </table>
27          <div class="funcprototype-spacer"> </div>
28        </div>
29      </div>
30      <div class="refsect1" id="parameters">
31        <h2>Parameters</h2>
32        <div class="variablelist">
33          <dl class="variablelist">
34            <dt>
35              <span class="term">
36                <em class="parameter">
37                  <code>api</code>
38                </em>
39              </span>
40            </dt>
41            <dd>
42              <p>
43                    Specifies the client API to bind, one of
44                    <code class="constant">EGL_OPENGL_API</code>,
45                    <code class="constant">EGL_OPENGL_ES_API</code>, or
46                    <code class="constant">EGL_OPENVG_API</code>.
47                </p>
48            </dd>
49          </dl>
50        </div>
51      </div>
52      <div class="refsect1" id="description">
53        <h2>Description</h2>
54        <p>
55            <code class="function">eglBindAPI</code> defines the current
56            rendering API for EGL in the thread it is called from. The
57            current rendering API is one of the client rendering APIs
58            supported by the EGL implementation, and affects the
59            behavior of other EGL commands including
60            <code class="function">eglCreateContext</code>,
61            <code class="function">eglGetCurrentContext</code>,
62            <code class="function">eglGetCurrentDisplay</code>,
63            <code class="function">eglGetCurrentSurface</code>,
64            <code class="function">eglMakeCurrent</code>,
65            <code class="function">eglWaitClient</code>, and
66            <code class="function">eglWaitNative</code>.
67        </p>
68        <p>
69            If <em class="parameter"><code>api</code></em> is
70            <code class="constant">EGL_OPENGL_API</code>, the current rendering
71            API is set to the OpenGL API.
72        </p>
73        <p>
74            If <em class="parameter"><code>api</code></em> is
75            <code class="constant">EGL_OPENGL_ES_API</code>, the current
76            rendering API is set to the OpenGL ES API.
77        </p>
78        <p>
79            If <em class="parameter"><code>api</code></em> is
80            <code class="constant">EGL_OPENVG_API</code>, the current rendering
81            API is set to the OpenVG API.
82        </p>
83        <p>
84            If an error occurs, the current rendering API is unchanged.
85        </p>
86      </div>
87      <div class="refsect1" id="notes">
88        <h2>Notes</h2>
89        <p>
90            <code class="function">eglBindAPI</code> and the corresponding
91            <code class="constant">EGL_OPENGL_ES_API</code> and
92            <code class="constant">EGL_OPENVG_API</code>
93            <em class="parameter"><code>api</code></em> parameters are supported only if
94            the EGL version is 1.2 or greater. The
95            <code class="constant">EGL_OPENGL_API</code> parameter is supported
96            only if the EGL version is 1.4 or greater.
97        </p>
98        <p>
99            The initial value of the current rendering API is
100            <code class="constant">EGL_OPENGL_ES_API</code> unless OpenGL ES is
101            not supported by an implementation, in which case the
102            initial value is <code class="constant">EGL_NONE</code> (however,
103            <code class="constant">EGL_NONE</code> is not a valid
104            <em class="parameter"><code>api</code></em> parameter to
105            <code class="function">eglBindAPI</code>).
106        </p>
107        <p>
108            The current rendering API can be queried by calling
109            <code class="function">eglQueryAPI</code>.
110        </p>
111      </div>
112      <div class="refsect1" id="errors">
113        <h2>Errors</h2>
114        <p>
115            <code class="constant">EGL_FALSE</code> is returned on failure.
116        </p>
117        <p>
118            <code class="constant">EGL_BAD_PARAMETER</code> is generated if
119            <em class="parameter"><code>api</code></em> is not one of the accepted
120            tokens, or if the specified client API is not supported by
121            the EGL implementation.
122        </p>
123      </div>
124      <div class="refsect1" id="seealso">
125        <h2>See Also</h2>
126        <p>
127            <a class="citerefentry" href="eglCreateContext.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreateContext</span></span></a>,
128            <a class="citerefentry" href="eglGetCurrentContext.xhtml"><span class="citerefentry"><span class="refentrytitle">eglGetCurrentContext</span></span></a>,
129            <a class="citerefentry" href="eglGetCurrentDisplay.xhtml"><span class="citerefentry"><span class="refentrytitle">eglGetCurrentDisplay</span></span></a>,
130            <a class="citerefentry" href="eglGetCurrentSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglGetCurrentSurface</span></span></a>,
131            <a class="citerefentry" href="eglMakeCurrent.xhtml"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>,
132            <a class="citerefentry" href="eglQueryAPI.xhtml"><span class="citerefentry"><span class="refentrytitle">eglQueryAPI</span></span></a>,
133            <a class="citerefentry" href="eglWaitClient.xhtml"><span class="citerefentry"><span class="refentrytitle">eglWaitClient</span></span></a>,
134            <a class="citerefentry" href="eglWaitNative.xhtml"><span class="citerefentry"><span class="refentrytitle">eglWaitNative</span></span></a>
135        </p>
136      </div>
137      <p>
138    </p>
139      <div class="refsect3" id="copyright">
140        <img src="KhronosLogo.jpg"/>
141        <p>
142            Copyright © 2003-2014 The Khronos Group Inc.
143            Permission is hereby granted, free of charge, to any person obtaining a
144            copy of this software and/or associated documentation files (the
145            "Materials"), to deal in the Materials without restriction, including
146            without limitation the rights to use, copy, modify, merge, publish,
147            distribute, sublicense, and/or sell copies of the Materials, and to
148            permit persons to whom the Materials are furnished to do so, subject to
149            the condition that this copyright notice and permission notice shall be included
150            in all copies or substantial portions of the Materials.
151        </p>
152      </div>
153      <p>
154</p>
155    </div>
156    <footer/>
157  </body>
158</html>
159