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>eglBindTexImage</title> 217 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /> 218 </head> 219 <body> 220 <div class="refentry"> 221 <a id="eglBindTexImage"></a> 222 <div class="titlepage"></div> 223 <div xmlns="" class="refnamediv"> 224 <h1>eglBindTexImage</h1> 225 <p> 226 Defines a two-dimensional texture image 227 </p> 228 </div> 229 <div class="refsynopsisdiv"> 230 <h2>C Specification</h2> 231 <div class="funcsynopsis"> 232 <table xmlns="" border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"> 233 <tr valign="bottom"> 234 <td> 235 <code xmlns="http://www.w3.org/1999/xhtml" class="funcdef">EGLBoolean <strong class="fsfunc">eglBindTexImage</strong>(</code> 236 <td>EGLDisplay <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">display</var>, </td> 237 </td> 238 </tr> 239 <tr valign="top"> 240 <td> </td> 241 <td>EGLSurface <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">surface</var>, </td> 242 </tr> 243 <tr valign="top"> 244 <td> </td> 245 <td>EGLint <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">buffer</var><code>)</code></td> 246 </tr> 247 </table> 248 </div> 249 </div> 250 <div class="refsect1"> 251 <a id="parameters"></a> 252 <h2>Parameters</h2> 253 <div class="variablelist"> 254 <dl class="variablelist"> 255 <dt> 256 <span class="term"> 257 <em class="parameter"> 258 <code>display</code> 259 </em> 260 </span> 261 </dt> 262 <dd> 263 <p>Specifies the EGL display connection.</p> 264 </dd> 265 <dt> 266 <span class="term"> 267 <em class="parameter"> 268 <code>surface</code> 269 </em> 270 </span> 271 </dt> 272 <dd> 273 <p> 274 Specifies the EGL surface. 275 </p> 276 </dd> 277 <dt> 278 <span class="term"> 279 <em class="parameter"> 280 <code>buffer</code> 281 </em> 282 </span> 283 </dt> 284 <dd> 285 <p>Specifies the texture image data.</p> 286 </dd> 287 </dl> 288 </div> 289 </div> 290 <div class="refsect1"> 291 <a id="description"></a> 292 <h2>Description</h2> 293 <p> 294 The texture image consists of the image data in <em class="parameter"><code>buffer</code></em> for the specified surface, and need not be copied. 295 </p> 296 <p> 297 The texture target, the texture format and the size of the texture components are derived from 298 attributes of the specified surface, which must be a pbuffer supporting one of the 299 <code class="constant">EGL_BIND_TO_TEXTURE_RGB</code> or <code class="constant">EGL_BIND_TO_TEXTURE_RGBA</code> attributes. 300 </p> 301 <p> 302 The pbuffer attribute <code class="constant">EGL_TEXTURE_FORMAT</code> determines the base internal format 303 of the texture. 304 </p> 305 <p> 306 The texture target is derived from the <code class="constant">EGL_TEXTURE_TARGET</code> attribute of surface. 307 If the attribute value is <code class="constant">EGL_TEXTURE_2D</code>, then <em class="parameter"><code>buffer</code></em> defines a texture for 308 the two-dimensional texture object which is bound to the current context (hereafter 309 referred to as the current texture object). 310 </p> 311 <p> 312 If <em class="parameter"><code>display</code></em> and <em class="parameter"><code>surface</code></em> are the display and surface for the calling thread's current 313 context, <code class="function">eglBindTexImage</code> performs an implicit <a class="citerefentry" href="glFlush.html"><span class="citerefentry"><span class="refentrytitle">glFlush</span></span></a>. 314 For other surfaces, <code class="function">eglBindTexImage</code> waits for all effects from previously issued OpenGL ES commands 315 drawing to the surface to complete before defining the texture image, as 316 though <a class="citerefentry" href="glFinish.html"><span class="citerefentry"><span class="refentrytitle">glFinish</span></span></a> were called on the last context to which that surface were bound. 317 </p> 318 <p> 319 After <code class="function">eglBindTexImage</code> is called, the specified surface is no longer available 320 for reading or writing. Any read operation, such as <a class="citerefentry" href="glReadPixels.html"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a> or 321 <a class="citerefentry" href="eglCopyBuffers.html"><span class="citerefentry"><span class="refentrytitle">eglCopyBuffers</span></span></a>, which reads values from any of the surface's color buffers or ancillary 322 buffers will produce indeterminate results. In addition, draw operations that are 323 done to the surface before its color buffer is released from the texture produce indeterminate 324 results. Specifically, if the surface is current to a context and thread 325 then rendering commands will be processed and the context state will be updated, 326 but the surface may or may not be written. 327 </p> 328 <p> 329 Texture mipmap levels are automatically generated when all of the following 330 conditions are met while calling <code class="function">eglBindTexImage</code>: 331 </p> 332 <div class="itemizedlist"> 333 <ul class="itemizedlist" style="list-style-type: disc; "> 334 <li class="listitem"> 335 <p> 336 The <code class="constant">EGL_MIPMAP_TEXTURE</code> attribute of the pbuffer being bound is 337 <code class="constant">EGL_TRUE</code>. 338 </p> 339 </li> 340 <li class="listitem"> 341 <p> 342 The OpenGL ES texture parameter <code class="constant">GL_GENERATE_MIPMAP</code> is <code class="constant">GL_TRUE</code> for 343 the currently bound texture. 344 </p> 345 </li> 346 <li class="listitem"> 347 <p> 348 The value of the <code class="constant">EGL_MIPMAP_LEVEL</code> attribute of the pbuffer being bound is 349 equal to the value of the texture parameter <code class="constant">GL_TEXTURE_BASE_LEVEL</code>. 350 In this case, additional mipmap levels are generated as described in section 3.8 351 of the OpenGL ES 1.1 Specification. 352 </p> 353 </li> 354 </ul> 355 </div> 356 <p> 357 In this case, additional mipmap levels are generated as described in section 3.8 358 of the OpenGL ES 1.1 Specification. 359 </p> 360 </div> 361 <div class="refsect1"> 362 <a id="notes"></a> 363 <h2>Notes</h2> 364 <p> 365 <a class="citerefentry" href="eglSwapBuffers.html"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a> has no effect if it is 366 called on a bound surface. 367 </p> 368 <p> 369 Any existing images associated with the different mipmap levels of the texture object 370 are freed (it is as if <a class="citerefentry" href="glTexImage.html"><span class="citerefentry"><span class="refentrytitle">glTexImage</span></span></a> 371 was called with an image of zero width). 372 </p> 373 <p> 374 The color buffer is bound to a texture object. If the texture object is 375 shared between contexts, then the color buffer is also shared. If a texture object is 376 deleted before <a class="citerefentry" href="eglReleaseTexImage.html"><span class="citerefentry"><span class="refentrytitle">eglReleaseTexImage</span></span></a> is called, then the color buffer is released and 377 the surface is made available for reading and writing. 378 </p> 379 <p> 380 It is not an error to call <a class="citerefentry" href="glTexImage2D.html"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a> or 381 <a class="citerefentry" href="glCopyTexImage2D.html"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a> to replace an 382 image of a texture object that has a color buffer bound to it. However, these calls 383 will cause the color buffer to be released back to the surface and new memory will 384 be allocated for the texture. Note that the color buffer is released even if the image 385 that is being defined is a mipmap level that was not defined by the color buffer. 386 </p> 387 <p> 388 <code class="function">eglBindTexImage</code> is ignored if there is no current rendering context. 389 </p> 390 </div> 391 <div class="refsect1"> 392 <a id="errors"></a> 393 <h2>Errors</h2> 394 <p> 395 <code class="constant">EGL_BAD_ACCESS</code> is generated if 396 <em class="parameter"><code>buffer</code></em> is already bound to a texture. 397 </p> 398 <p> 399 <code class="constant">EGL_BAD_MATCH</code> is generated if the 400 surface attribute <code class="constant">EGL_TEXTURE_FORMAT</code> is 401 set to <code class="constant">EGL_NO_TEXTURE</code>. 402 </p> 403 <p> 404 <code class="constant">EGL_BAD_MATCH</code> is generated if 405 <em class="parameter"><code>buffer</code></em> is not a valid buffer 406 (currently only <code class="constant">EGL_BACK_BUFFER</code> may be 407 specified). 408 </p> 409 <p> 410 <code class="constant">EGL_BAD_SURFACE</code> is generated if 411 <em class="parameter"><code>surface</code></em> is not an EGL surface, or is 412 not a pbuffer surface supporting texture binding. 413 </p> 414 </div> 415 <div class="refsect1"> 416 <a id="seealso"></a> 417 <h2>See Also</h2> 418 <p> 419 <a class="citerefentry" href="eglReleaseTexImage.html"><span class="citerefentry"><span class="refentrytitle">eglReleaseTexImage</span></span></a> 420 </p> 421 </div> 422 <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> 423Copyright © 2003-2014 The Khronos Group Inc. 424Permission is hereby granted, free of charge, to any person obtaining a 425copy of this software and/or associated documentation files (the 426"Materials"), to deal in the Materials without restriction, including 427without limitation the rights to use, copy, modify, merge, publish, 428distribute, sublicense, and/or sell copies of the Materials, and to 429permit persons to whom the Materials are furnished to do so, subject to 430the condition that this copyright notice and permission notice shall be included 431in all copies or substantial portions of the Materials. 432</div> 433 </div> 434 </body> 435</html> 436