• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3                            "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4<refentry xml:base="" id="eglQueryContext">
5    <refentryinfo>
6         <copyright>
7             <year>2003-2014</year>
8             <holder>The Khronos Group Inc.</holder>
9         </copyright>
10    </refentryinfo>
11    <refmeta>
12        <refentrytitle>eglQueryContext</refentrytitle>
13        <manvolnum>3G</manvolnum>
14    </refmeta>
15    <refnamediv>
16        <refname>eglQueryContext</refname>
17        <refpurpose>
18            return <acronym>EGL</acronym> rendering context information
19        </refpurpose>
20    </refnamediv>
21    <refsynopsisdiv>
22        <title>C Specification</title>
23        <funcsynopsis>
24            <funcprototype>
25                <funcdef>EGLBoolean <function>eglQueryContext</function></funcdef>
26                <paramdef>EGLDisplay <parameter>display</parameter></paramdef>
27                <paramdef>EGLContext <parameter>context</parameter></paramdef>
28                <paramdef>EGLint <parameter>attribute</parameter></paramdef>
29                <paramdef>EGLint * <parameter>value</parameter></paramdef>
30            </funcprototype>
31        </funcsynopsis>
32    </refsynopsisdiv>
33    <refsect1 id="parameters"><title>Parameters</title>
34        <variablelist>
35            <varlistentry>
36                <term><parameter>display</parameter></term>
37                <listitem>
38                    <para>
39                        Specifies the EGL display connection.
40                    </para>
41                </listitem>
42            </varlistentry>
43            <varlistentry>
44                <term><parameter>context</parameter></term>
45                <listitem>
46                    <para>
47                        Specifies the EGL rendering context to query.
48                    </para>
49                </listitem>
50            </varlistentry>
51            <varlistentry>
52                <term><parameter>attribute</parameter></term>
53                <listitem>
54                    <para>
55                        Specifies the EGL rendering context attribute to be returned.
56                    </para>
57                </listitem>
58            </varlistentry>
59            <varlistentry>
60                <term><parameter>value</parameter></term>
61                <listitem>
62                    <para>
63                        Returns the requested value.
64                    </para>
65                </listitem>
66            </varlistentry>
67        </variablelist>
68    </refsect1>
69    <refsect1 id="description"><title>Description</title>
70        <para>
71            <function>eglQueryContext</function> returns in
72            <parameter>value</parameter> the value of
73            <parameter>attribute</parameter> for <parameter>context</parameter>.
74            <parameter>attribute</parameter> can be one of the following:
75        </para>
76        <variablelist>
77            <varlistentry>
78                <term><constant>EGL_CONFIG_ID</constant></term>
79                <listitem><para>
80                    Returns the ID of the EGL frame buffer configuration
81                    with respect to which the context was created.
82                </para></listitem>
83            </varlistentry>
84            <varlistentry>
85                <term><constant>EGL_CONTEXT_CLIENT_TYPE</constant></term>
86                <listitem><para>
87                    Returns the type of client API which the context
88                    supports (one of
89                    <constant>EGL_OPENGL_API</constant>,
90                    <constant>EGL_OPENGL_ES_API</constant>, or
91                    <constant>EGL_OPENVG_API</constant>).
92                </para></listitem>
93            </varlistentry>
94            <varlistentry>
95                <term><constant>EGL_CONTEXT_CLIENT_VERSION</constant></term>
96                <listitem><para>
97                    Returns the version of the client API which the
98                    context supports, as specified at context creation
99                    time. The resulting value is only meaningful for an
100                    OpenGL ES context.
101                </para></listitem>
102            </varlistentry>
103            <varlistentry>
104                <term><constant>EGL_RENDER_BUFFER</constant></term>
105                <listitem>
106                    <para>
107                        Returns the buffer which client API rendering
108                        via the context will use. The value returned
109                        depends on properties of both the context, and
110                        the surface to which the context is bound:
111                    </para>
112                    <itemizedlist>
113                    <listitem><para>
114                        If the context is bound to a pixmap surface,
115                        then <constant>EGL_SINGLE_BUFFER</constant> will
116                        be returned.
117                    </para></listitem>
118                    <listitem><para>
119                        If the context is bound to a pbuffer surface,
120                        then <constant>EGL_BACK_BUFFER</constant> will
121                        be returned.
122                    </para></listitem>
123                    <listitem><para>
124                        If the context is bound to a window surface,
125                        then either <constant>EGL_BACK_BUFFER</constant>
126                        or <constant>EGL_SINGLE_BUFFER</constant> may be
127                        returned. The value returned depends on both the
128                        buffer requested by the setting of the
129                        <constant>EGL_RENDER_BUFFER</constant> property
130                        of the surface (which may be queried by calling
131                        <function>eglQuerySurface</function>), and on
132                        the client API (not all client APIs support
133                        single-buffer rendering to window surfaces).
134                    </para></listitem>
135                    <listitem><para>
136                        If the context is not bound to a surface, such
137                        as an OpenGL ES context bound to a framebuffer
138                        object, then <constant>EGL_NONE</constant> will
139                        be returned.
140                    </para></listitem>
141                    </itemizedlist>
142                </listitem>
143            </varlistentry>
144        </variablelist>
145    </refsect1>
146    <refsect1 id="notes"><title>Notes</title>
147        <para>
148            Attributes <constant>EGL_CONTEXT_CLIENT_TYPE</constant> and
149            <constant>EGL_RENDER_BUFFER</constant> are supported only if
150            the EGL version is 1.2 or greater.
151        </para>
152        <para>
153            Attribute <constant>EGL_CONTEXT_CLIENT_VERSION</constant> is
154            supported only if the EGL version is 1.3 or greater.
155        </para>
156    </refsect1>
157    <refsect1 id="errors"><title>Errors</title>
158        <para>
159            <constant>EGL_FALSE</constant> is returned on failure,
160            <constant>EGL_TRUE</constant> otherwise.
161            <parameter>value</parameter> is not modified when
162            <constant>EGL_FALSE</constant> is returned.
163        </para>
164        <para>
165            <constant>EGL_BAD_DISPLAY</constant> is generated if
166            <parameter>display</parameter> is not an EGL display connection.
167        </para>
168        <para>
169            <constant>EGL_NOT_INITIALIZED</constant> is generated if
170            <parameter>display</parameter> has not been initialized.
171        </para>
172        <para>
173            <constant>EGL_BAD_CONTEXT</constant> is generated if
174            <parameter>context</parameter> is not an EGL rendering context.
175        </para>
176        <para>
177            <constant>EGL_BAD_ATTRIBUTE</constant> is generated if
178            <parameter>attribute</parameter> is not a valid context attribute.
179        </para>
180    </refsect1>
181    <refsect1 id="seealso"><title>See Also</title>
182        <para>
183            <citerefentry><refentrytitle>eglCreateContext</refentrytitle></citerefentry>
184        </para>
185    </refsect1>
186    <refsect3 id="Copyright"><title></title>
187        <!-- Content included from copyright.inc.xsl -->
188        <imageobject>
189                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
190        </imageobject>
191        <para />
192    </refsect3>
193</refentry>
194