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">eglSurfaceAttrib - 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="eglSurfaceAttrib"> 11 <div class="titlepage"/> 12 <div class="refnamediv"> 13 <h2>Name</h2> 14 <p>eglSurfaceAttrib — 15 set an <abbr class="acronym">EGL</abbr> surface attribute 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">eglSurfaceAttrib</strong>(</code> 25 </td> 26 <td>EGLDisplay <var class="pdparam">display</var>, </td> 27 </tr> 28 <tr> 29 <td> </td> 30 <td>EGLSurface <var class="pdparam">surface</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>surface</code> 64 </em> 65 </span> 66 </dt> 67 <dd> 68 <p> 69 Specifies the EGL surface. 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 surface attribute to set. 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 Specifies the attributes required 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">eglSurfaceAttrib</code> sets the value of 103 <em class="parameter"><code>attribute</code></em> for 104 <em class="parameter"><code>surface</code></em> to 105 <em class="parameter"><code>value</code></em>. 106 <em class="parameter"><code>attribute</code></em> can be one of the 107 following: 108 </p> 109 <div class="variablelist"> 110 <dl class="variablelist"> 111 <dt> 112 <span class="term"> 113 <code class="constant">EGL_MIPMAP_LEVEL</code> 114 </span> 115 </dt> 116 <dd> 117 <p> 118 For mipmap textures, the 119 <code class="constant">EGL_MIPMAP_LEVEL</code> attribute 120 indicates which level of the mipmap should be 121 rendered. If the value of this attribute is outside 122 the range of supported mipmap levels, the closest 123 valid mipmap level is selected for rendering. The 124 default value is <code class="constant">0</code>. 125 </p> 126 </dd> 127 <dt> 128 <span class="term"> 129 <code class="constant">EGL_MULTISAMPLE_RESOLVE</code> 130 </span> 131 </dt> 132 <dd> 133 <p> 134 Specifies the filter to use when resolving the 135 multisample buffer (this may occur when swapping or 136 copying the surface, or when changing the client API 137 context bound to the surface). A 138 <em class="parameter"><code>value</code></em> of 139 <code class="constant">EGL_MULTISAMPLE_RESOLVE_DEFAULT</code> 140 chooses the default implementation-defined filtering 141 method, while 142 <code class="constant">EGL_MULTISAMPLE_RESOLVE_BOX</code> 143 chooses a one-pixel wide box filter placing equal 144 weighting on all multisample values. 145 </p> 146 <p> 147 The initial value of 148 <code class="constant">EGL_MULTISAMPLE_RESOLVE</code> is 149 <code class="constant">EGL_MULTISAMPLE_RESOLVE_DEFAULT</code>. 150 </p> 151 </dd> 152 <dt> 153 <span class="term"> 154 <code class="constant">EGL_SWAP_BEHAVIOR</code> 155 </span> 156 </dt> 157 <dd> 158 <p> 159 Specifies the effect on the color buffer of posting 160 a surface with 161 <a class="citerefentry" href="eglSwapBuffers.xhtml"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a>. 162 A <em class="parameter"><code>value</code></em> of 163 <code class="constant">EGL_BUFFER_PRESERVED</code> indicates 164 that color buffer contents are unaffected, while 165 <code class="constant">EGL_BUFFER_DESTROYED</code> indicates 166 that color buffer contents may be destroyed or 167 changed by the operation. 168 </p> 169 <p> 170 The initial value of 171 <code class="constant">EGL_SWAP_BEHAVIOR</code> is chosen by 172 the implementation. 173 </p> 174 </dd> 175 </dl> 176 </div> 177 </div> 178 <div class="refsect1" id="notes"> 179 <h2>Notes</h2> 180 <p> 181 Attribute <code class="constant">EGL_MULTISAMPLE_RESOLVE</code> is 182 supported only if the EGL version is 1.4 or greater. 183 </p> 184 <p> 185 Attribute <code class="constant">EGL_SWAP_BEHAVIOR</code> is 186 supported only if the EGL version is 1.2 or greater. 187 </p> 188 <p> 189 If the value of pbuffer attribute 190 <code class="constant">EGL_TEXTURE_FORMAT</code> is 191 <code class="constant">EGL_NO_TEXTURE</code>, the value of attribute 192 <code class="constant">EGL_TEXTURE_TARGET</code> is 193 <code class="constant">EGL_NO_TEXTURE</code>, or 194 <em class="parameter"><code>surface</code></em> is not a pbuffer, then 195 attribute <code class="constant">EGL_MIPMAP_LEVEL</code> may be set, 196 but has no effect. 197 </p> 198 </div> 199 <div class="refsect1" id="errors"> 200 <h2>Errors</h2> 201 <p> 202 <code class="constant">EGL_FALSE</code> is returned on failure, 203 <code class="constant">EGL_TRUE</code> otherwise. 204 </p> 205 <p> 206 <code class="constant">EGL_BAD_DISPLAY</code> is generated if 207 <em class="parameter"><code>display</code></em> is not an EGL display connection. 208 </p> 209 <p> 210 <code class="constant">EGL_BAD_MATCH</code> is generated if 211 <em class="parameter"><code>attribute</code></em> is 212 <code class="constant">EGL_MULTISAMPLE_RESOLVE</code>, 213 <em class="parameter"><code>value</code></em> is 214 <code class="constant">EGL_MULTISAMPLE_RESOLVE_BOX</code>, and the 215 <code class="constant">EGL_SURFACE_TYPE</code> attribute of the 216 <span class="type">EGLConfig</span> used to create 217 <em class="parameter"><code>surface</code></em> does not contain 218 <code class="constant">EGL_MULTISAMPLE_RESOLVE_BOX_BIT</code>. 219 </p> 220 <p> 221 <code class="constant">EGL_BAD_MATCH</code> is generated if 222 <em class="parameter"><code>attribute</code></em> is 223 <code class="constant">EGL_SWAP_BEHAVIOR</code>, 224 <em class="parameter"><code>value</code></em> is 225 <code class="constant">EGL_BUFFER_PRESERVED</code>, and the 226 <code class="constant">EGL_SURFACE_TYPE</code> attribute of the 227 <span class="type">EGLConfig</span> used to create 228 <em class="parameter"><code>surface</code></em> does not contain 229 <code class="constant">EGL_SWAP_BEHAVIOR_PRESERVED_BIT</code>. 230 </p> 231 <p> 232 <code class="constant">EGL_NOT_INITIALIZED</code> is generated if 233 <em class="parameter"><code>display</code></em> has not been initialized. 234 </p> 235 <p> 236 <code class="constant">EGL_BAD_SURFACE</code> is generated if 237 <em class="parameter"><code>surface</code></em> is not an EGL surface. 238 </p> 239 <p> 240 <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 241 <em class="parameter"><code>attribute</code></em> is not a valid surface attribute. 242 </p> 243 </div> 244 <div class="refsect1" id="seealso"> 245 <h2>See Also</h2> 246 <p> 247 <a class="citerefentry" href="eglCreatePbufferSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreatePbufferSurface</span></span></a>, 248 <a class="citerefentry" href="eglCreatePixmapSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreatePixmapSurface</span></span></a>, 249 <a class="citerefentry" href="eglCreateWindowSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreateWindowSurface</span></span></a>, 250 <a class="citerefentry" href="eglQuerySurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 251 </p> 252 </div> 253 <p> 254 </p> 255 <div class="refsect3" id="copyright"> 256 <img src="KhronosLogo.jpg"/> 257 <p> 258 Copyright © 2003-2014 The Khronos Group Inc. 259 Permission is hereby granted, free of charge, to any person obtaining a 260 copy of this software and/or associated documentation files (the 261 "Materials"), to deal in the Materials without restriction, including 262 without limitation the rights to use, copy, modify, merge, publish, 263 distribute, sublicense, and/or sell copies of the Materials, and to 264 permit persons to whom the Materials are furnished to do so, subject to 265 the condition that this copyright notice and permission notice shall be included 266 in all copies or substantial portions of the Materials. 267 </p> 268 </div> 269 <p> 270</p> 271 </div> 272 <footer/> 273 </body> 274</html> 275