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="eglBindAPI">
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>eglBindAPI</refentrytitle>
1302f4aeb0Sopenharmony_ci        <manvolnum>3G</manvolnum>
1402f4aeb0Sopenharmony_ci    </refmeta>
1502f4aeb0Sopenharmony_ci    <refnamediv>
1602f4aeb0Sopenharmony_ci        <refname>eglBindAPI</refname>
1702f4aeb0Sopenharmony_ci        <refpurpose>Set the current rendering API</refpurpose>
1802f4aeb0Sopenharmony_ci    </refnamediv>
1902f4aeb0Sopenharmony_ci    <refsynopsisdiv><title>C Specification</title>
2002f4aeb0Sopenharmony_ci        <funcsynopsis>
2102f4aeb0Sopenharmony_ci            <funcprototype>
2202f4aeb0Sopenharmony_ci                <funcdef>EGLBoolean <function>eglBindAPI</function></funcdef>
2302f4aeb0Sopenharmony_ci                <paramdef>EGLenum <parameter>api</parameter></paramdef>
2402f4aeb0Sopenharmony_ci            </funcprototype>
2502f4aeb0Sopenharmony_ci        </funcsynopsis>
2602f4aeb0Sopenharmony_ci    </refsynopsisdiv>
2702f4aeb0Sopenharmony_ci    <refsect1 id="parameters"><title>Parameters</title>
2802f4aeb0Sopenharmony_ci        <variablelist>
2902f4aeb0Sopenharmony_ci        <varlistentry>
3002f4aeb0Sopenharmony_ci            <term><parameter>api</parameter></term>
3102f4aeb0Sopenharmony_ci            <listitem>
3202f4aeb0Sopenharmony_ci                <para>
3302f4aeb0Sopenharmony_ci                    Specifies the client API to bind, one of
3402f4aeb0Sopenharmony_ci                    <constant>EGL_OPENGL_API</constant>,
3502f4aeb0Sopenharmony_ci                    <constant>EGL_OPENGL_ES_API</constant>, or
3602f4aeb0Sopenharmony_ci                    <constant>EGL_OPENVG_API</constant>.
3702f4aeb0Sopenharmony_ci                </para>
3802f4aeb0Sopenharmony_ci            </listitem>
3902f4aeb0Sopenharmony_ci        </varlistentry>
4002f4aeb0Sopenharmony_ci        </variablelist>
4102f4aeb0Sopenharmony_ci    </refsect1>
4202f4aeb0Sopenharmony_ci    <refsect1 id="description"><title>Description</title>
4302f4aeb0Sopenharmony_ci        <para>
4402f4aeb0Sopenharmony_ci            <function>eglBindAPI</function> defines the current
4502f4aeb0Sopenharmony_ci            rendering API for EGL in the thread it is called from. The
4602f4aeb0Sopenharmony_ci            current rendering API is one of the client rendering APIs
4702f4aeb0Sopenharmony_ci            supported by the EGL implementation, and affects the
4802f4aeb0Sopenharmony_ci            behavior of other EGL commands including
4902f4aeb0Sopenharmony_ci            <function>eglCreateContext</function>,
5002f4aeb0Sopenharmony_ci            <function>eglGetCurrentContext</function>,
5102f4aeb0Sopenharmony_ci            <function>eglGetCurrentDisplay</function>,
5202f4aeb0Sopenharmony_ci            <function>eglGetCurrentSurface</function>,
5302f4aeb0Sopenharmony_ci            <function>eglMakeCurrent</function>,
5402f4aeb0Sopenharmony_ci            <function>eglWaitClient</function>, and
5502f4aeb0Sopenharmony_ci            <function>eglWaitNative</function>.
5602f4aeb0Sopenharmony_ci        </para>
5702f4aeb0Sopenharmony_ci        <para>
5802f4aeb0Sopenharmony_ci            If <parameter>api</parameter> is
5902f4aeb0Sopenharmony_ci            <constant>EGL_OPENGL_API</constant>, the current rendering
6002f4aeb0Sopenharmony_ci            API is set to the OpenGL API.
6102f4aeb0Sopenharmony_ci        </para>
6202f4aeb0Sopenharmony_ci        <para>
6302f4aeb0Sopenharmony_ci            If <parameter>api</parameter> is
6402f4aeb0Sopenharmony_ci            <constant>EGL_OPENGL_ES_API</constant>, the current
6502f4aeb0Sopenharmony_ci            rendering API is set to the OpenGL ES API.
6602f4aeb0Sopenharmony_ci        </para>
6702f4aeb0Sopenharmony_ci        <para>
6802f4aeb0Sopenharmony_ci            If <parameter>api</parameter> is
6902f4aeb0Sopenharmony_ci            <constant>EGL_OPENVG_API</constant>, the current rendering
7002f4aeb0Sopenharmony_ci            API is set to the OpenVG API.
7102f4aeb0Sopenharmony_ci        </para>
7202f4aeb0Sopenharmony_ci        <para>
7302f4aeb0Sopenharmony_ci            If an error occurs, the current rendering API is unchanged.
7402f4aeb0Sopenharmony_ci        </para>
7502f4aeb0Sopenharmony_ci    </refsect1>
7602f4aeb0Sopenharmony_ci    <refsect1 id="notes"><title>Notes</title>
7702f4aeb0Sopenharmony_ci        <para>
7802f4aeb0Sopenharmony_ci            <function>eglBindAPI</function> and the corresponding
7902f4aeb0Sopenharmony_ci            <constant>EGL_OPENGL_ES_API</constant> and
8002f4aeb0Sopenharmony_ci            <constant>EGL_OPENVG_API</constant>
8102f4aeb0Sopenharmony_ci            <parameter>api</parameter> parameters are supported only if
8202f4aeb0Sopenharmony_ci            the EGL version is 1.2 or greater. The
8302f4aeb0Sopenharmony_ci            <constant>EGL_OPENGL_API</constant> parameter is supported
8402f4aeb0Sopenharmony_ci            only if the EGL version is 1.4 or greater.
8502f4aeb0Sopenharmony_ci        </para>
8602f4aeb0Sopenharmony_ci        <para>
8702f4aeb0Sopenharmony_ci            The initial value of the current rendering API is
8802f4aeb0Sopenharmony_ci            <constant>EGL_OPENGL_ES_API</constant> unless OpenGL ES is
8902f4aeb0Sopenharmony_ci            not supported by an implementation, in which case the
9002f4aeb0Sopenharmony_ci            initial value is <constant>EGL_NONE</constant> (however,
9102f4aeb0Sopenharmony_ci            <constant>EGL_NONE</constant> is not a valid
9202f4aeb0Sopenharmony_ci            <parameter>api</parameter> parameter to
9302f4aeb0Sopenharmony_ci            <function>eglBindAPI</function>).
9402f4aeb0Sopenharmony_ci        </para>
9502f4aeb0Sopenharmony_ci        <para>
9602f4aeb0Sopenharmony_ci            The current rendering API can be queried by calling
9702f4aeb0Sopenharmony_ci            <function>eglQueryAPI</function>.
9802f4aeb0Sopenharmony_ci        </para>
9902f4aeb0Sopenharmony_ci    </refsect1>
10002f4aeb0Sopenharmony_ci    <refsect1 id="errors"><title>Errors</title>
10102f4aeb0Sopenharmony_ci        <para>
10202f4aeb0Sopenharmony_ci            <constant>EGL_FALSE</constant> is returned on failure.
10302f4aeb0Sopenharmony_ci        </para>
10402f4aeb0Sopenharmony_ci        <para>
10502f4aeb0Sopenharmony_ci            <constant>EGL_BAD_PARAMETER</constant> is generated if
10602f4aeb0Sopenharmony_ci            <parameter>api</parameter> is not one of the accepted
10702f4aeb0Sopenharmony_ci            tokens, or if the specified client API is not supported by
10802f4aeb0Sopenharmony_ci            the EGL implementation.
10902f4aeb0Sopenharmony_ci        </para>
11002f4aeb0Sopenharmony_ci    </refsect1>
11102f4aeb0Sopenharmony_ci    <refsect1 id="seealso"><title>See Also</title>
11202f4aeb0Sopenharmony_ci        <para>
11302f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglCreateContext</refentrytitle></citerefentry>,
11402f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglGetCurrentContext</refentrytitle></citerefentry>,
11502f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglGetCurrentDisplay</refentrytitle></citerefentry>,
11602f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglGetCurrentSurface</refentrytitle></citerefentry>,
11702f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglMakeCurrent</refentrytitle></citerefentry>,
11802f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglQueryAPI</refentrytitle></citerefentry>,
11902f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglWaitClient</refentrytitle></citerefentry>,
12002f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglWaitNative</refentrytitle></citerefentry>
12102f4aeb0Sopenharmony_ci        </para>
12202f4aeb0Sopenharmony_ci    </refsect1>
12302f4aeb0Sopenharmony_ci    <refsect3 id="Copyright"><title></title>
12402f4aeb0Sopenharmony_ci        <!-- Content included from copyright.inc.xsl -->
12502f4aeb0Sopenharmony_ci        <imageobject>
12602f4aeb0Sopenharmony_ci                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
12702f4aeb0Sopenharmony_ci        </imageobject>
12802f4aeb0Sopenharmony_ci        <para />
12902f4aeb0Sopenharmony_ci    </refsect3>
13002f4aeb0Sopenharmony_ci</refentry>
131