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="eglQueryContext">
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>eglQueryContext</refentrytitle>
1302f4aeb0Sopenharmony_ci        <manvolnum>3G</manvolnum>
1402f4aeb0Sopenharmony_ci    </refmeta>
1502f4aeb0Sopenharmony_ci    <refnamediv>
1602f4aeb0Sopenharmony_ci        <refname>eglQueryContext</refname>
1702f4aeb0Sopenharmony_ci        <refpurpose>
1802f4aeb0Sopenharmony_ci            return <acronym>EGL</acronym> rendering context information
1902f4aeb0Sopenharmony_ci        </refpurpose>
2002f4aeb0Sopenharmony_ci    </refnamediv>
2102f4aeb0Sopenharmony_ci    <refsynopsisdiv>
2202f4aeb0Sopenharmony_ci        <title>C Specification</title>
2302f4aeb0Sopenharmony_ci        <funcsynopsis>
2402f4aeb0Sopenharmony_ci            <funcprototype>
2502f4aeb0Sopenharmony_ci                <funcdef>EGLBoolean <function>eglQueryContext</function></funcdef>
2602f4aeb0Sopenharmony_ci                <paramdef>EGLDisplay <parameter>display</parameter></paramdef>
2702f4aeb0Sopenharmony_ci                <paramdef>EGLContext <parameter>context</parameter></paramdef>
2802f4aeb0Sopenharmony_ci                <paramdef>EGLint <parameter>attribute</parameter></paramdef>
2902f4aeb0Sopenharmony_ci                <paramdef>EGLint * <parameter>value</parameter></paramdef>
3002f4aeb0Sopenharmony_ci            </funcprototype>
3102f4aeb0Sopenharmony_ci        </funcsynopsis>
3202f4aeb0Sopenharmony_ci    </refsynopsisdiv>
3302f4aeb0Sopenharmony_ci    <refsect1 id="parameters"><title>Parameters</title>
3402f4aeb0Sopenharmony_ci        <variablelist>
3502f4aeb0Sopenharmony_ci            <varlistentry>
3602f4aeb0Sopenharmony_ci                <term><parameter>display</parameter></term>
3702f4aeb0Sopenharmony_ci                <listitem>
3802f4aeb0Sopenharmony_ci                    <para>
3902f4aeb0Sopenharmony_ci                        Specifies the EGL display connection.
4002f4aeb0Sopenharmony_ci                    </para>
4102f4aeb0Sopenharmony_ci                </listitem>
4202f4aeb0Sopenharmony_ci            </varlistentry>
4302f4aeb0Sopenharmony_ci            <varlistentry>
4402f4aeb0Sopenharmony_ci                <term><parameter>context</parameter></term>
4502f4aeb0Sopenharmony_ci                <listitem>
4602f4aeb0Sopenharmony_ci                    <para>
4702f4aeb0Sopenharmony_ci                        Specifies the EGL rendering context to query.
4802f4aeb0Sopenharmony_ci                    </para>
4902f4aeb0Sopenharmony_ci                </listitem>
5002f4aeb0Sopenharmony_ci            </varlistentry>
5102f4aeb0Sopenharmony_ci            <varlistentry>
5202f4aeb0Sopenharmony_ci                <term><parameter>attribute</parameter></term>
5302f4aeb0Sopenharmony_ci                <listitem>
5402f4aeb0Sopenharmony_ci                    <para>
5502f4aeb0Sopenharmony_ci                        Specifies the EGL rendering context attribute to be returned.
5602f4aeb0Sopenharmony_ci                    </para>
5702f4aeb0Sopenharmony_ci                </listitem>
5802f4aeb0Sopenharmony_ci            </varlistentry>
5902f4aeb0Sopenharmony_ci            <varlistentry>
6002f4aeb0Sopenharmony_ci                <term><parameter>value</parameter></term>
6102f4aeb0Sopenharmony_ci                <listitem>
6202f4aeb0Sopenharmony_ci                    <para>
6302f4aeb0Sopenharmony_ci                        Returns the requested value.
6402f4aeb0Sopenharmony_ci                    </para>
6502f4aeb0Sopenharmony_ci                </listitem>
6602f4aeb0Sopenharmony_ci            </varlistentry>
6702f4aeb0Sopenharmony_ci        </variablelist>
6802f4aeb0Sopenharmony_ci    </refsect1>
6902f4aeb0Sopenharmony_ci    <refsect1 id="description"><title>Description</title>
7002f4aeb0Sopenharmony_ci        <para>
7102f4aeb0Sopenharmony_ci            <function>eglQueryContext</function> returns in
7202f4aeb0Sopenharmony_ci            <parameter>value</parameter> the value of
7302f4aeb0Sopenharmony_ci            <parameter>attribute</parameter> for <parameter>context</parameter>.
7402f4aeb0Sopenharmony_ci            <parameter>attribute</parameter> can be one of the following:
7502f4aeb0Sopenharmony_ci        </para>
7602f4aeb0Sopenharmony_ci        <variablelist>
7702f4aeb0Sopenharmony_ci            <varlistentry>
7802f4aeb0Sopenharmony_ci                <term><constant>EGL_CONFIG_ID</constant></term>
7902f4aeb0Sopenharmony_ci                <listitem><para>
8002f4aeb0Sopenharmony_ci                    Returns the ID of the EGL frame buffer configuration
8102f4aeb0Sopenharmony_ci                    with respect to which the context was created.
8202f4aeb0Sopenharmony_ci                </para></listitem>
8302f4aeb0Sopenharmony_ci            </varlistentry>
8402f4aeb0Sopenharmony_ci            <varlistentry>
8502f4aeb0Sopenharmony_ci                <term><constant>EGL_CONTEXT_CLIENT_TYPE</constant></term>
8602f4aeb0Sopenharmony_ci                <listitem><para>
8702f4aeb0Sopenharmony_ci                    Returns the type of client API which the context
8802f4aeb0Sopenharmony_ci                    supports (one of
8902f4aeb0Sopenharmony_ci                    <constant>EGL_OPENGL_API</constant>,
9002f4aeb0Sopenharmony_ci                    <constant>EGL_OPENGL_ES_API</constant>, or
9102f4aeb0Sopenharmony_ci                    <constant>EGL_OPENVG_API</constant>).
9202f4aeb0Sopenharmony_ci                </para></listitem>
9302f4aeb0Sopenharmony_ci            </varlistentry>
9402f4aeb0Sopenharmony_ci            <varlistentry>
9502f4aeb0Sopenharmony_ci                <term><constant>EGL_CONTEXT_CLIENT_VERSION</constant></term>
9602f4aeb0Sopenharmony_ci                <listitem><para>
9702f4aeb0Sopenharmony_ci                    Returns the version of the client API which the
9802f4aeb0Sopenharmony_ci                    context supports, as specified at context creation
9902f4aeb0Sopenharmony_ci                    time. The resulting value is only meaningful for an
10002f4aeb0Sopenharmony_ci                    OpenGL ES context.
10102f4aeb0Sopenharmony_ci                </para></listitem>
10202f4aeb0Sopenharmony_ci            </varlistentry>
10302f4aeb0Sopenharmony_ci            <varlistentry>
10402f4aeb0Sopenharmony_ci                <term><constant>EGL_RENDER_BUFFER</constant></term>
10502f4aeb0Sopenharmony_ci                <listitem>
10602f4aeb0Sopenharmony_ci                    <para>
10702f4aeb0Sopenharmony_ci                        Returns the buffer which client API rendering
10802f4aeb0Sopenharmony_ci                        via the context will use. The value returned
10902f4aeb0Sopenharmony_ci                        depends on properties of both the context, and
11002f4aeb0Sopenharmony_ci                        the surface to which the context is bound:
11102f4aeb0Sopenharmony_ci                    </para>
11202f4aeb0Sopenharmony_ci                    <itemizedlist>
11302f4aeb0Sopenharmony_ci                    <listitem><para>
11402f4aeb0Sopenharmony_ci                        If the context is bound to a pixmap surface,
11502f4aeb0Sopenharmony_ci                        then <constant>EGL_SINGLE_BUFFER</constant> will
11602f4aeb0Sopenharmony_ci                        be returned.
11702f4aeb0Sopenharmony_ci                    </para></listitem>
11802f4aeb0Sopenharmony_ci                    <listitem><para>
11902f4aeb0Sopenharmony_ci                        If the context is bound to a pbuffer surface,
12002f4aeb0Sopenharmony_ci                        then <constant>EGL_BACK_BUFFER</constant> will
12102f4aeb0Sopenharmony_ci                        be returned.
12202f4aeb0Sopenharmony_ci                    </para></listitem>
12302f4aeb0Sopenharmony_ci                    <listitem><para>
12402f4aeb0Sopenharmony_ci                        If the context is bound to a window surface,
12502f4aeb0Sopenharmony_ci                        then either <constant>EGL_BACK_BUFFER</constant>
12602f4aeb0Sopenharmony_ci                        or <constant>EGL_SINGLE_BUFFER</constant> may be
12702f4aeb0Sopenharmony_ci                        returned. The value returned depends on both the
12802f4aeb0Sopenharmony_ci                        buffer requested by the setting of the
12902f4aeb0Sopenharmony_ci                        <constant>EGL_RENDER_BUFFER</constant> property
13002f4aeb0Sopenharmony_ci                        of the surface (which may be queried by calling
13102f4aeb0Sopenharmony_ci                        <function>eglQuerySurface</function>), and on
13202f4aeb0Sopenharmony_ci                        the client API (not all client APIs support
13302f4aeb0Sopenharmony_ci                        single-buffer rendering to window surfaces).
13402f4aeb0Sopenharmony_ci                    </para></listitem>
13502f4aeb0Sopenharmony_ci                    <listitem><para>
13602f4aeb0Sopenharmony_ci                        If the context is not bound to a surface, such
13702f4aeb0Sopenharmony_ci                        as an OpenGL ES context bound to a framebuffer
13802f4aeb0Sopenharmony_ci                        object, then <constant>EGL_NONE</constant> will
13902f4aeb0Sopenharmony_ci                        be returned.
14002f4aeb0Sopenharmony_ci                    </para></listitem>
14102f4aeb0Sopenharmony_ci                    </itemizedlist>
14202f4aeb0Sopenharmony_ci                </listitem>
14302f4aeb0Sopenharmony_ci            </varlistentry>
14402f4aeb0Sopenharmony_ci        </variablelist>
14502f4aeb0Sopenharmony_ci    </refsect1>
14602f4aeb0Sopenharmony_ci    <refsect1 id="notes"><title>Notes</title>
14702f4aeb0Sopenharmony_ci        <para>
14802f4aeb0Sopenharmony_ci            Attributes <constant>EGL_CONTEXT_CLIENT_TYPE</constant> and
14902f4aeb0Sopenharmony_ci            <constant>EGL_RENDER_BUFFER</constant> are supported only if
15002f4aeb0Sopenharmony_ci            the EGL version is 1.2 or greater.
15102f4aeb0Sopenharmony_ci        </para>
15202f4aeb0Sopenharmony_ci        <para>
15302f4aeb0Sopenharmony_ci            Attribute <constant>EGL_CONTEXT_CLIENT_VERSION</constant> is
15402f4aeb0Sopenharmony_ci            supported only if the EGL version is 1.3 or greater.
15502f4aeb0Sopenharmony_ci        </para>
15602f4aeb0Sopenharmony_ci    </refsect1>
15702f4aeb0Sopenharmony_ci    <refsect1 id="errors"><title>Errors</title>
15802f4aeb0Sopenharmony_ci        <para>
15902f4aeb0Sopenharmony_ci            <constant>EGL_FALSE</constant> is returned on failure,
16002f4aeb0Sopenharmony_ci            <constant>EGL_TRUE</constant> otherwise.
16102f4aeb0Sopenharmony_ci            <parameter>value</parameter> is not modified when
16202f4aeb0Sopenharmony_ci            <constant>EGL_FALSE</constant> is returned.
16302f4aeb0Sopenharmony_ci        </para>
16402f4aeb0Sopenharmony_ci        <para>
16502f4aeb0Sopenharmony_ci            <constant>EGL_BAD_DISPLAY</constant> is generated if
16602f4aeb0Sopenharmony_ci            <parameter>display</parameter> is not an EGL display connection.
16702f4aeb0Sopenharmony_ci        </para>
16802f4aeb0Sopenharmony_ci        <para>
16902f4aeb0Sopenharmony_ci            <constant>EGL_NOT_INITIALIZED</constant> is generated if
17002f4aeb0Sopenharmony_ci            <parameter>display</parameter> has not been initialized.
17102f4aeb0Sopenharmony_ci        </para>
17202f4aeb0Sopenharmony_ci        <para>
17302f4aeb0Sopenharmony_ci            <constant>EGL_BAD_CONTEXT</constant> is generated if
17402f4aeb0Sopenharmony_ci            <parameter>context</parameter> is not an EGL rendering context.
17502f4aeb0Sopenharmony_ci        </para>
17602f4aeb0Sopenharmony_ci        <para>
17702f4aeb0Sopenharmony_ci            <constant>EGL_BAD_ATTRIBUTE</constant> is generated if
17802f4aeb0Sopenharmony_ci            <parameter>attribute</parameter> is not a valid context attribute.
17902f4aeb0Sopenharmony_ci        </para>
18002f4aeb0Sopenharmony_ci    </refsect1>
18102f4aeb0Sopenharmony_ci    <refsect1 id="seealso"><title>See Also</title>
18202f4aeb0Sopenharmony_ci        <para>
18302f4aeb0Sopenharmony_ci            <citerefentry><refentrytitle>eglCreateContext</refentrytitle></citerefentry>
18402f4aeb0Sopenharmony_ci        </para>
18502f4aeb0Sopenharmony_ci    </refsect1>
18602f4aeb0Sopenharmony_ci    <refsect3 id="Copyright"><title></title>
18702f4aeb0Sopenharmony_ci        <!-- Content included from copyright.inc.xsl -->
18802f4aeb0Sopenharmony_ci        <imageobject>
18902f4aeb0Sopenharmony_ci                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
19002f4aeb0Sopenharmony_ci        </imageobject>
19102f4aeb0Sopenharmony_ci        <para />
19202f4aeb0Sopenharmony_ci    </refsect3>
19302f4aeb0Sopenharmony_ci</refentry>
194