1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> 3<!-- saved from url=(0013)about:internet --> 4<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" xmlns:xlink="http://www.w3.org/1999/xlink" pref:renderer="mathplayer-dl"> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 7 <style xmlns="" type="text/css"> 8 /* This style sets a margin around the entire page */ 9 html, body { 10 margin: 10px; 11 } 12 13 p { 14 font: normal 16px verdana, sans-serif; 15 margin: 0; 16 padding-bottom:12px; 17 } 18 19 h1 { 20 font: bold 25px verdana, sans-serif; 21 margin-top: 0; 22 margin-bottom: 3px; 23 padding-top: 0; 24 padding-bottom: 0; 25 } 26 27 h2 { 28 font: bold 19px verdana, sans-serif; 29 margin-top: 28px; 30 margin-bottom: 3px; 31 padding-top: 0; 32 padding-bottom: 0; 33 } 34 35 h3 { 36 font: bold 19px verdana, sans-serif !important; 37 margin-top: 28px; 38 margin-bottom: 3px; 39 padding-top: 0; 40 padding-bottom: 0; 41 } 42 43 li { 44 font: normal 16px verdana, sans-serif; 45 margin-top: 0; 46 margin-bottom: 18px; 47 padding-top: 0; 48 padding-bottom: 0; 49 } 50 51 .pdparam { 52 font: italic 16px verdana, sans-serif; 53 } 54 55 .term { 56 font: italic 16px verdana, sans-serif; 57 font-weight: normal; 58 } 59 60 .type { 61 font: normal 16px verdana, sans-serif !important; 62 } 63 64 .parameter { 65 font-style: italic; 66 } 67 68 a:link, a:visited { 69 color: blue; 70 text-decoration: none; 71 font: normal 16px; 72 } 73 74 a:hover { 75 background-color: #FFFF99; 76 font: normal 16px; 77 } 78 79 div.funcsynopsis { 80 text-align: left; 81 background-color: #e6e6e6; 82 font: normal 16px verdana, sans-serif; 83 padding-top: 10px; 84 padding-bottom: 10px; 85 } 86 87 div.funcsynopsis table { 88 border-collapse: separate; 89 font: normal 16px verdana, sans-serif; 90 } 91 92 div.funcsynopsis td { 93 background-color: #e6e6e6; 94 border: 0 solid #000; 95 padding: 1px; 96 font: normal 16px verdana, sans-serif; 97 } 98 99 div.refsect1 { 100 font-family: verdana, sans-serif; 101 font-size: 16px; 102 } 103 104 code.constant { 105 font: normal 16px courier new, monospace !important; 106 } 107 108 span.errorname { 109 font: normal 16px verdana, sans-serif !important; 110 } 111 112 code.function { 113 font: bold 16px verdana, sans-serif !important; 114 } 115 116 b.fsfunc { 117 font: bold 16px verdana, sans-serif !important; 118 } 119 120 code.varname { 121 font: italic 16px verdana, sans-serif; 122 } 123 124 code.replaceable { 125 font: italic 16px courier new, monospace; 126 } 127 128 code.funcdef { 129 font: normal 16px verdana, sans-serif !important; 130 } 131 132 .citerefentry { 133 font: normal 16px verdana, sans-serif !important; 134 } 135 136 .parameter { 137 font-style: italic; 138 } 139 140 code.fsfunc { 141 font: normal 16px verdana, sans-serif !important; 142 } 143 144 /* PARAMETER: This style controls spacing between the terms in Parameter section */ 145 dt { 146 margin-top: 15px; 147 } 148 149 /* TABLES: These styles apply to all tables OTHER than the Synopsis and Example tables */ 150 div.refsect1 table { 151 width: 100%; 152 margin-top: 10px; 153 background-color: #FFF; 154 border-collapse: collapse; 155 border-color: #000; 156 border-width: 1px; 157 font: normal 16px verdana, sans-serif; 158 } 159 160 div.refsect1 th { 161 border-collapse: collapse; 162 border-color: #000; 163 border-width: 1px; 164 font: bold 16px verdana, sans-serif; 165 } 166 167 div.refsect1 td { 168 background-color: #FFF; 169 padding: 5px; 170 vertical-align: text-top; 171 border-collapse: collapse; 172 border-color: #000; 173 border-width: 1px; 174 font: normal 16px verdana, sans-serif; 175 } 176 177 div.refsect1 p{ 178 font: normal 16px verdana, sans-serif; 179 margin-top: 8px; 180 margin-bottom: 8px; 181 padding-top: 0; 182 padding-bottom: 0; 183 } 184 185 186 /* EXAMPLE: These styles apply only to the Example section */ 187 div.refsect2 { 188 font: normal 16px courier new, monospace !important; 189 } 190 191 div.refsect2 table { 192 margin-top: 0; 193 background-color: #e6e6e6; 194 width: 100%; 195 border: 0 solid #000; 196 padding: 2px; 197 font: normal 16px courier new, monospace !important; 198 } 199 200 div.refsect2 td { 201 background-color: #e6e6e6; 202 font: normal 16px courier new, monospace !important; 203 white-space:pre; 204 } 205 206 /* COPYRIGHT: This style formats the text of the copyright statement at the bottom of the page */ 207 div.refsect3 { 208 font: normal 11px verdana, sans-serif; 209 margin-top: 50px; 210 margin-bottom: 20px; 211 padding-top: 0; 212 padding-bottom: 0; 213 } 214 215</style> 216 <title>eglReleaseThread</title> 217 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /> 218 </head> 219 <body> 220 <div class="refentry"> 221 <a id="eglReleaseThread"></a> 222 <div class="titlepage"></div> 223 <div xmlns="" class="refnamediv"> 224 <h1>eglReleaseThread</h1> 225 <p>Release EGL per-thread state</p> 226 </div> 227 <div class="refsynopsisdiv"> 228 <h2>C Specification</h2> 229 <div class="funcsynopsis"> 230 <table xmlns="" border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"> 231 <tr valign="bottom"> 232 <td> 233 <code xmlns="http://www.w3.org/1999/xhtml" class="funcdef">EGLBoolean <strong class="fsfunc">eglReleaseThread</strong>(</code> 234 <td xmlns="http://www.w3.org/1999/xhtml"><code>void)</code>;</td> 235 <td xmlns="http://www.w3.org/1999/xhtml"> </td> 236 </td> 237 </tr> 238 </table> 239 </div> 240 </div> 241 <div class="refsect1"> 242 <a id="description"></a> 243 <h2>Description</h2> 244 <p> 245 <code class="function">eglReleaseThread</code> returns the EGL to its 246 state at thread initialization, releasing all per-thread 247 state including the error status returned by 248 <span class="command"><strong>eglGetError</strong></span>, the currently bound 249 rendering API defined by <span class="command"><strong>eglBindAPI</strong></span>, and 250 the current contexts for each supported client API. The 251 overhead of maintaining this state may be objectionable in 252 applications which create and destroy many threads, but only 253 call EGL or client APIs in a few of those threads at any 254 given time. 255 </p> 256 <p> 257 <code class="constant">EGL_TRUE</code> is returned on success, and the 258 following actions are taken: 259 </p> 260 <div class="itemizedlist"> 261 <ul class="itemizedlist" style="list-style-type: disc; "> 262 <li class="listitem"> 263 <p> 264 For each client API supported by EGL, if there is a 265 currently bound context, that context is released. 266 This is equivalent to calling 267 <code class="function">eglMakeCurrent</code> with ctx set to 268 <code class="constant">EGL_NO_CONTEXT</code> and both draw 269 and read set to <code class="constant">EGL_NO_SURFACE</code> 270 (see section 3.7.3). 271 </p> 272 </li> 273 <li class="listitem"> 274 <p> 275 The current rendering API is reset to its value at 276 thread initialization (see 277 <span class="command"><strong>eglBindAPI</strong></span>). 278 </p> 279 </li> 280 <li class="listitem"> 281 <p> 282 Any additional implementation-dependent per-thread 283 state maintained by EGL is marked for deletion as 284 soon as possible. 285 </p> 286 </li> 287 </ul> 288 </div> 289 <p> 290 <code class="function">eglReleaseThread</code> may be called in any 291 thread at any time, and may be called more than once in a 292 single thread. The initialization status of EGL (see section 293 3.2) is not affected by releasing the thread; only 294 per-thread state is affected. 295 </p> 296 <p> 297 Resources explicitly allocated by calls to EGL, such as 298 contexts, surfaces, and configuration lists, are not 299 affected by <code class="function">eglReleaseThread</code>. Such 300 resources belong not to the thread, but to the EGL 301 implementation as a whole. 302 </p> 303 </div> 304 <div class="refsect1"> 305 <a id="notes"></a> 306 <h2>Notes</h2> 307 <p> 308 <code class="function">eglReleaseThread</code> is supported only if the 309 EGL version is 1.2 or greater. 310 </p> 311 <p> 312 Applications may call other EGL routines from a thread 313 following <code class="function">eglReleaseThread</code>, but any 314 such call may reallocate the EGL state previously released. 315 In particular, calling <code class="function">eglGetError</code> 316 immediately following a successful call to 317 <code class="function">eglReleaseThread</code> will return 318 <code class="constant">EGL_SUCCESS</code>, but will also result in 319 reallocating per-thread state. 320 </p> 321 </div> 322 <div class="refsect1"> 323 <a id="errors"></a> 324 <h2>Errors</h2> 325 <p> 326 <code class="constant">EGL_FALSE</code> is returned on failure, 327 <code class="constant">EGL_TRUE</code> otherwise. There are no 328 defined conditions under which failure will occur. Even if 329 EGL is not initialized on any EGLDisplay, 330 <code class="function">eglReleaseThread</code> should succeed. 331 </p> 332 <p> 333 However, platform-dependent failures may be signaled through 334 the value returned from <code class="function">eglGetError</code>. 335 Unless the platform-dependent behavior is known, a failed 336 call to <code class="function">eglReleaseThread</code> should be 337 assumed to leave the current rendering API, and the 338 currently bound contexts for each supported client API, in 339 an unknown state. 340 </p> 341 </div> 342 <div class="refsect1"> 343 <a id="seealso"></a> 344 <h2>See Also</h2> 345 <p> 346 <a class="citerefentry" href="eglBindAPI.html"><span class="citerefentry"><span class="refentrytitle">eglBindAPI</span></span></a>, 347 <a class="citerefentry" href="eglGetError.html"><span class="citerefentry"><span class="refentrytitle">eglGetError</span></span></a>, 348 <a class="citerefentry" href="eglMakeCurrent.html"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a> 349 </p> 350 </div> 351 <div xmlns="" class="refsect3" lang="en" xml:lang="en"><a xmlns="http://www.w3.org/1999/xhtml" id="Copyright"></a><h4 xmlns="http://www.w3.org/1999/xhtml"></h4><img xmlns="http://www.w3.org/1999/xhtml" src="KhronosLogo.jpg" /><p xmlns="http://www.w3.org/1999/xhtml"></p> 352Copyright © 2003-2014 The Khronos Group Inc. 353Permission is hereby granted, free of charge, to any person obtaining a 354copy of this software and/or associated documentation files (the 355"Materials"), to deal in the Materials without restriction, including 356without limitation the rights to use, copy, modify, merge, publish, 357distribute, sublicense, and/or sell copies of the Materials, and to 358permit persons to whom the Materials are furnished to do so, subject to 359the condition that this copyright notice and permission notice shall be included 360in all copies or substantial portions of the Materials. 361</div> 362 </div> 363 </body> 364</html> 365