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