• 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">eglQueryContext - 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="eglQueryContext">
11      <div class="titlepage"/>
12      <div class="refnamediv">
13        <h2>Name</h2>
14        <p>eglQueryContext —
15            return <abbr class="acronym">EGL</abbr> rendering context information
16        </p>
17      </div>
18      <div class="refsynopsisdiv">
19        <h2>C Specification</h2>
20        <div class="funcsynopsis">
21          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
22            <tr>
23              <td>
24                <code class="funcdef">EGLBoolean <strong class="fsfunc">eglQueryContext</strong>(</code>
25              </td>
26              <td>EGLDisplay <var class="pdparam">display</var>, </td>
27            </tr>
28            <tr>
29              <td> </td>
30              <td>EGLContext <var class="pdparam">context</var>, </td>
31            </tr>
32            <tr>
33              <td> </td>
34              <td>EGLint <var class="pdparam">attribute</var>, </td>
35            </tr>
36            <tr>
37              <td> </td>
38              <td>EGLint * <var class="pdparam">value</var><code>)</code>;</td>
39            </tr>
40          </table>
41          <div class="funcprototype-spacer"> </div>
42        </div>
43      </div>
44      <div class="refsect1" id="parameters">
45        <h2>Parameters</h2>
46        <div class="variablelist">
47          <dl class="variablelist">
48            <dt>
49              <span class="term">
50                <em class="parameter">
51                  <code>display</code>
52                </em>
53              </span>
54            </dt>
55            <dd>
56              <p>
57                        Specifies the EGL display connection.
58                    </p>
59            </dd>
60            <dt>
61              <span class="term">
62                <em class="parameter">
63                  <code>context</code>
64                </em>
65              </span>
66            </dt>
67            <dd>
68              <p>
69                        Specifies the EGL rendering context to query.
70                    </p>
71            </dd>
72            <dt>
73              <span class="term">
74                <em class="parameter">
75                  <code>attribute</code>
76                </em>
77              </span>
78            </dt>
79            <dd>
80              <p>
81                        Specifies the EGL rendering context attribute to be returned.
82                    </p>
83            </dd>
84            <dt>
85              <span class="term">
86                <em class="parameter">
87                  <code>value</code>
88                </em>
89              </span>
90            </dt>
91            <dd>
92              <p>
93                        Returns the requested value.
94                    </p>
95            </dd>
96          </dl>
97        </div>
98      </div>
99      <div class="refsect1" id="description">
100        <h2>Description</h2>
101        <p>
102            <code class="function">eglQueryContext</code> returns in
103            <em class="parameter"><code>value</code></em> the value of
104            <em class="parameter"><code>attribute</code></em> for <em class="parameter"><code>context</code></em>.
105            <em class="parameter"><code>attribute</code></em> can be one of the following:
106        </p>
107        <div class="variablelist">
108          <dl class="variablelist">
109            <dt>
110              <span class="term">
111                <code class="constant">EGL_CONFIG_ID</code>
112              </span>
113            </dt>
114            <dd>
115              <p>
116                    Returns the ID of the EGL frame buffer configuration
117                    with respect to which the context was created.
118                </p>
119            </dd>
120            <dt>
121              <span class="term">
122                <code class="constant">EGL_CONTEXT_CLIENT_TYPE</code>
123              </span>
124            </dt>
125            <dd>
126              <p>
127                    Returns the type of client API which the context
128                    supports (one of
129                    <code class="constant">EGL_OPENGL_API</code>,
130                    <code class="constant">EGL_OPENGL_ES_API</code>, or
131                    <code class="constant">EGL_OPENVG_API</code>).
132                </p>
133            </dd>
134            <dt>
135              <span class="term">
136                <code class="constant">EGL_CONTEXT_CLIENT_VERSION</code>
137              </span>
138            </dt>
139            <dd>
140              <p>
141                    Returns the version of the client API which the
142                    context supports, as specified at context creation
143                    time. The resulting value is only meaningful for an
144                    OpenGL ES context.
145                </p>
146            </dd>
147            <dt>
148              <span class="term">
149                <code class="constant">EGL_RENDER_BUFFER</code>
150              </span>
151            </dt>
152            <dd>
153              <p>
154                        Returns the buffer which client API rendering
155                        via the context will use. The value returned
156                        depends on properties of both the context, and
157                        the surface to which the context is bound:
158                    </p>
159              <div class="itemizedlist">
160                <ul style="list-style-type: disc; " class="itemizedlist">
161                  <li class="listitem">
162                    <p>
163                        If the context is bound to a pixmap surface,
164                        then <code class="constant">EGL_SINGLE_BUFFER</code> will
165                        be returned.
166                    </p>
167                  </li>
168                  <li class="listitem">
169                    <p>
170                        If the context is bound to a pbuffer surface,
171                        then <code class="constant">EGL_BACK_BUFFER</code> will
172                        be returned.
173                    </p>
174                  </li>
175                  <li class="listitem">
176                    <p>
177                        If the context is bound to a window surface,
178                        then either <code class="constant">EGL_BACK_BUFFER</code>
179                        or <code class="constant">EGL_SINGLE_BUFFER</code> may be
180                        returned. The value returned depends on both the
181                        buffer requested by the setting of the
182                        <code class="constant">EGL_RENDER_BUFFER</code> property
183                        of the surface (which may be queried by calling
184                        <code class="function">eglQuerySurface</code>), and on
185                        the client API (not all client APIs support
186                        single-buffer rendering to window surfaces).
187                    </p>
188                  </li>
189                  <li class="listitem">
190                    <p>
191                        If the context is not bound to a surface, such
192                        as an OpenGL ES context bound to a framebuffer
193                        object, then <code class="constant">EGL_NONE</code> will
194                        be returned.
195                    </p>
196                  </li>
197                </ul>
198              </div>
199            </dd>
200          </dl>
201        </div>
202      </div>
203      <div class="refsect1" id="notes">
204        <h2>Notes</h2>
205        <p>
206            Attributes <code class="constant">EGL_CONTEXT_CLIENT_TYPE</code> and
207            <code class="constant">EGL_RENDER_BUFFER</code> are supported only if
208            the EGL version is 1.2 or greater.
209        </p>
210        <p>
211            Attribute <code class="constant">EGL_CONTEXT_CLIENT_VERSION</code> is
212            supported only if the EGL version is 1.3 or greater.
213        </p>
214      </div>
215      <div class="refsect1" id="errors">
216        <h2>Errors</h2>
217        <p>
218            <code class="constant">EGL_FALSE</code> is returned on failure,
219            <code class="constant">EGL_TRUE</code> otherwise.
220            <em class="parameter"><code>value</code></em> is not modified when
221            <code class="constant">EGL_FALSE</code> is returned.
222        </p>
223        <p>
224            <code class="constant">EGL_BAD_DISPLAY</code> is generated if
225            <em class="parameter"><code>display</code></em> is not an EGL display connection.
226        </p>
227        <p>
228            <code class="constant">EGL_NOT_INITIALIZED</code> is generated if
229            <em class="parameter"><code>display</code></em> has not been initialized.
230        </p>
231        <p>
232            <code class="constant">EGL_BAD_CONTEXT</code> is generated if
233            <em class="parameter"><code>context</code></em> is not an EGL rendering context.
234        </p>
235        <p>
236            <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if
237            <em class="parameter"><code>attribute</code></em> is not a valid context attribute.
238        </p>
239      </div>
240      <div class="refsect1" id="seealso">
241        <h2>See Also</h2>
242        <p>
243            <a class="citerefentry" href="eglCreateContext.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreateContext</span></span></a>
244        </p>
245      </div>
246      <p>
247    </p>
248      <div class="refsect3" id="copyright">
249        <img src="KhronosLogo.jpg"/>
250        <p>
251            Copyright © 2003-2014 The Khronos Group Inc.
252            Permission is hereby granted, free of charge, to any person obtaining a
253            copy of this software and/or associated documentation files (the
254            "Materials"), to deal in the Materials without restriction, including
255            without limitation the rights to use, copy, modify, merge, publish,
256            distribute, sublicense, and/or sell copies of the Materials, and to
257            permit persons to whom the Materials are furnished to do so, subject to
258            the condition that this copyright notice and permission notice shall be included
259            in all copies or substantial portions of the Materials.
260        </p>
261      </div>
262      <p>
263</p>
264    </div>
265    <footer/>
266  </body>
267</html>
268