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="eglGetConfigAttrib">
5    <refentryinfo>
6         <copyright>
7             <year>2003-2014</year>
8             <holder>The Khronos Group Inc.</holder>
9         </copyright>
10    </refentryinfo>
11    <refmeta>
12        <refentrytitle>eglGetConfigAttrib</refentrytitle>
13        <manvolnum>3G</manvolnum>
14    </refmeta>
15    <refnamediv>
16        <refname>eglGetConfigAttrib</refname>
17        <refpurpose>
18            return information about an <acronym>EGL</acronym> frame buffer
19            configuration
20        </refpurpose>
21    </refnamediv>
22    <refsynopsisdiv>
23        <title>C Specification</title>
24        <funcsynopsis>
25            <funcprototype>
26                <funcdef>EGLBoolean <function>eglGetConfigAttrib</function></funcdef>
27                <paramdef>EGLDisplay <parameter>display</parameter></paramdef>
28                <paramdef>EGLConfig <parameter>config</parameter></paramdef>
29                <paramdef>EGLint <parameter>attribute</parameter></paramdef>
30                <paramdef>EGLint * <parameter>value</parameter></paramdef>
31            </funcprototype>
32        </funcsynopsis>
33    </refsynopsisdiv>
34    <refsect1 id="parameters"><title>Parameters</title>
35        <variablelist>
36            <varlistentry>
37                <term><parameter>display</parameter></term>
38                <listitem><para>Specifies the EGL display connection.</para></listitem>
39            </varlistentry>
40            <varlistentry>
41                <term><parameter>config</parameter></term>
42                <listitem><para>Specifies the EGL frame buffer configuration to be
43                    queried.
44                </para></listitem>
45            </varlistentry>
46            <varlistentry>
47                <term><parameter>attribute</parameter></term>
48                <listitem><para>Specifies the EGL rendering context attribute to be
49                returned.</para></listitem>
50            </varlistentry>
51            <varlistentry>
52                <term><parameter>value</parameter></term>
53                <listitem><para>Returns the requested value.</para></listitem>
54            </varlistentry>
55        </variablelist>
56    </refsect1>
57    <refsect1 id="description"><title>Description</title>
58        <para>
59            <function>eglGetConfigAttrib</function> returns in
60            <parameter>value</parameter> the value of
61            <parameter>attribute</parameter> for
62            <parameter>config</parameter>
63            (config attributes are described in more detail in the
64            <citerefentry><refentrytitle>eglChooseConfig</refentrytitle></citerefentry>
65            reference page).
66            <parameter>attribute</parameter> can be one of the following:
67        </para>
68        <variablelist>
69            <varlistentry>
70            <term><constant>EGL_ALPHA_SIZE</constant></term>
71            <listitem><para>Returns the number of bits of alpha stored in the
72            color buffer.
73            </para></listitem>
74            </varlistentry>
75            <varlistentry>
76                <term><constant>EGL_ALPHA_MASK_SIZE</constant></term>
77                <listitem><para>
78                    Returns the number of bits in the alpha mask buffer.
79                </para></listitem>
80            </varlistentry>
81            <varlistentry>
82            <term><constant>EGL_BIND_TO_TEXTURE_RGB</constant></term>
83            <listitem><para>Returns <constant>EGL_TRUE</constant> if color buffers can be
84            bound to an RGB texture,
85            <constant>EGL_FALSE</constant> otherwise.
86            </para></listitem>
87            </varlistentry>
88            <varlistentry>
89            <term><constant>EGL_BIND_TO_TEXTURE_RGBA</constant></term>
90            <listitem><para>Returns <constant>EGL_TRUE</constant> if color buffers can be
91            bound to an RGBA texture,
92            <constant>EGL_FALSE</constant> otherwise.
93            </para></listitem>
94            </varlistentry>
95            <varlistentry>
96            <term><constant>EGL_BLUE_SIZE</constant></term>
97            <listitem><para>Returns the number of bits of blue stored in the
98            color buffer.
99            </para></listitem>
100            </varlistentry>
101            <varlistentry>
102            <term><constant>EGL_BUFFER_SIZE</constant></term>
103            <listitem><para>Returns the depth of the color buffer.
104                It is the sum of
105                <constant>EGL_RED_SIZE</constant>,
106                <constant>EGL_GREEN_SIZE</constant>,
107                <constant>EGL_BLUE_SIZE</constant>, and
108                <constant>EGL_ALPHA_SIZE</constant>.
109            </para></listitem>
110            </varlistentry>
111            <varlistentry>
112                <term><constant>EGL_COLOR_BUFFER_TYPE</constant></term>
113                <listitem><para>
114                    Returns the color buffer type. Possible types are
115                    <constant>EGL_RGB_BUFFER</constant> and
116                    <constant>EGL_LUMINANCE_BUFFER</constant>.
117                </para></listitem>
118            </varlistentry>
119            <varlistentry>
120            <term><constant>EGL_CONFIG_CAVEAT</constant></term>
121            <listitem><para>Returns the caveats for the frame buffer configuration.
122                Possible caveat values are
123                <constant>EGL_NONE</constant>,
124                <constant>EGL_SLOW_CONFIG</constant>, and
125                <constant>EGL_NON_CONFORMANT</constant>.
126            </para></listitem>
127            </varlistentry>
128            <varlistentry>
129            <term><constant>EGL_CONFIG_ID</constant></term>
130            <listitem><para>Returns the ID of the frame buffer configuration.
131            </para></listitem>
132            </varlistentry>
133            <varlistentry>
134            <term><constant>EGL_CONFORMANT</constant></term>
135            <listitem><para>
136                Returns a bitmask indicating which client API contexts
137                created with respect to this config are conformant.
138            </para></listitem>
139            </varlistentry>
140            <varlistentry>
141            <term><constant>EGL_DEPTH_SIZE</constant></term>
142            <listitem><para>Returns the number of bits in the depth buffer.
143            </para></listitem>
144            </varlistentry>
145            <varlistentry>
146            <term><constant>EGL_GREEN_SIZE</constant></term>
147            <listitem><para>Returns the number of bits of green stored in the
148            color buffer.
149            </para></listitem>
150            </varlistentry>
151            <varlistentry>
152            <term><constant>EGL_LEVEL</constant></term>
153            <listitem><para>Returns the frame buffer level.
154                Level zero is the default frame buffer.
155                Positive levels correspond to frame buffers that overlay the default
156                buffer and negative levels correspond to frame buffers that underlay
157                the default buffer.
158            </para></listitem>
159            </varlistentry>
160            <varlistentry>
161                <term><constant>EGL_LUMINANCE_SIZE</constant></term>
162                <listitem>
163                <para>
164                    Returns the number of bits of luminance stored in the luminance buffer.
165                </para>
166                </listitem>
167            </varlistentry>
168            <varlistentry>
169            <term><constant>EGL_MAX_PBUFFER_WIDTH</constant></term>
170            <listitem><para>Returns the maximum width of a pixel buffer surface in pixels.
171            </para></listitem>
172            </varlistentry>
173            <varlistentry>
174            <term><constant>EGL_MAX_PBUFFER_HEIGHT</constant></term>
175            <listitem><para>Returns the maximum height of a pixel buffer surface in pixels.
176            </para></listitem>
177            </varlistentry>
178            <varlistentry>
179            <term><constant>EGL_MAX_PBUFFER_PIXELS</constant></term>
180            <listitem><para>Returns the maximum size of a pixel buffer surface in pixels.
181            </para></listitem>
182            </varlistentry>
183            <varlistentry>
184                <term><constant>EGL_MAX_SWAP_INTERVAL</constant></term>
185                <listitem><para>Returns the maximum value that can be passed to eglSwapInterval.
186                </para></listitem>
187            </varlistentry>
188            <varlistentry>
189                <term><constant>EGL_MIN_SWAP_INTERVAL</constant></term>
190                <listitem><para>Returns the minimum value that can be passed to eglSwapInterval.
191                </para></listitem>
192            </varlistentry>
193            <varlistentry>
194            <term><constant>EGL_NATIVE_RENDERABLE</constant></term>
195            <listitem><para>Returns <constant>EGL_TRUE</constant> if native rendering
196                APIs can render into the surface,
197                <constant>EGL_FALSE</constant> otherwise.
198            </para></listitem>
199            </varlistentry>
200            <varlistentry>
201            <term><constant>EGL_NATIVE_VISUAL_ID</constant></term>
202            <listitem><para>Returns the ID of the associated native visual.
203            </para></listitem>
204            </varlistentry>
205            <varlistentry>
206            <term><constant>EGL_NATIVE_VISUAL_TYPE</constant></term>
207            <listitem><para>Returns the type of the associated native visual.
208            </para></listitem>
209            </varlistentry>
210            <varlistentry>
211            <term><constant>EGL_RED_SIZE</constant></term>
212            <listitem><para>Returns the number of bits of red stored in the
213            color buffer.
214            </para></listitem>
215            </varlistentry>
216            <varlistentry>
217                <term><constant>EGL_RENDERABLE_TYPE</constant></term>
218                <listitem>
219                <para>
220                    Returns a bitmask indicating the types of supported
221                    client API contexts.
222                </para>
223                </listitem>
224            </varlistentry>
225            <varlistentry>
226            <term><constant>EGL_SAMPLE_BUFFERS</constant></term>
227            <listitem><para>Returns the number of multisample buffers.
228            </para></listitem>
229            </varlistentry>
230            <varlistentry>
231            <term><constant>EGL_SAMPLES</constant></term>
232            <listitem><para>Returns the number of samples per pixel.</para></listitem>
233            </varlistentry>
234            <varlistentry>
235            <term><constant>EGL_STENCIL_SIZE</constant></term>
236            <listitem><para>Returns the number of bits in the stencil buffer.
237            </para></listitem>
238            </varlistentry>
239            <varlistentry>
240            <term><constant>EGL_SURFACE_TYPE</constant></term>
241            <listitem><para>
242                Returns a bitmask indicating the types of supported EGL
243                surfaces.
244            </para></listitem>
245            </varlistentry>
246            <varlistentry>
247            <term><constant>EGL_TRANSPARENT_TYPE</constant></term>
248            <listitem><para>Returns the type of supported transparency.
249                Possible transparency values are:
250                <constant>EGL_NONE</constant>, and
251                <constant>EGL_TRANSPARENT_RGB</constant>.
252            </para></listitem>
253            </varlistentry>
254            <varlistentry>
255            <term><constant>EGL_TRANSPARENT_RED_VALUE</constant></term>
256            <listitem><para>Returns the transparent red value.</para></listitem>
257            </varlistentry>
258            <varlistentry>
259            <term><constant>EGL_TRANSPARENT_GREEN_VALUE</constant></term>
260            <listitem><para>Returns the transparent green value.</para></listitem>
261            </varlistentry>
262            <varlistentry>
263            <term><constant>EGL_TRANSPARENT_BLUE_VALUE</constant></term>
264            <listitem><para>Returns the transparent blue value.</para></listitem>
265            </varlistentry>
266        </variablelist>
267    </refsect1>
268    <refsect1 id="notes"><title>Notes</title>
269        <para>
270            <constant>EGL_CONFORMANT</constant> is supported only if the
271            EGL version is 1.3 or greater.
272        </para>
273        <para>
274            <constant>EGL_ALPHA_MASK_SIZE</constant>,
275            <constant>EGL_COLOR_BUFFER_TYPE</constant>,
276            <constant>EGL_LUMINANCE_SIZE</constant>, and
277            <constant>EGL_RENDERABLE_TYPE</constant> are supported only
278            if the EGL version is 1.2 or greater.
279        </para>
280        <para>
281            While <constant>EGL_MATCH_NATIVE_PIXMAP</constant> can be
282            specified in the attribute list passed to
283            <citerefentry><refentrytitle>eglChooseConfig</refentrytitle></citerefentry>,
284            it is not an attribute of the resulting config and cannot be
285            queried using <function>eglGetConfigAttrib</function>.
286        </para>
287    </refsect1>
288    <refsect1 id="errors"><title>Errors</title>
289        <para>
290            <constant>EGL_FALSE</constant> is returned on failure,
291            <constant>EGL_TRUE</constant> otherwise.
292            <parameter>value</parameter> is not modified when
293            <constant>EGL_FALSE</constant> is returned.
294        </para>
295        <para>
296            <constant>EGL_BAD_DISPLAY</constant> is generated if
297            <parameter>display</parameter> is not an EGL display connection.
298        </para>
299        <para>
300            <constant>EGL_NOT_INITIALIZED</constant> is generated if
301            <parameter>display</parameter> has not been initialized.
302        </para>
303        <para>
304            <constant>EGL_BAD_CONFIG</constant> is generated if
305            <parameter>config</parameter> is not an EGL frame buffer configuration.
306        </para>
307        <para>
308            <constant>EGL_BAD_ATTRIBUTE</constant> is generated if
309            <parameter>attribute</parameter> is not a valid frame buffer
310            configuration attribute.
311        </para>
312    </refsect1>
313    <refsect1 id="seealso"><title>See Also</title>
314        <para>
315            <citerefentry><refentrytitle>eglChooseConfig</refentrytitle></citerefentry>,
316            <citerefentry><refentrytitle>eglGetConfigs</refentrytitle></citerefentry>
317        </para>
318    </refsect1>
319    <refsect3 id="Copyright"><title></title>
320        <!-- Content included from copyright.inc.xsl -->
321        <imageobject>
322                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
323        </imageobject>
324        <para />
325    </refsect3>
326</refentry>
327