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>eglQuerySurface</title> 217 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /> 218 </head> 219 <body> 220 <div class="refentry"> 221 <a id="eglQuerySurface"></a> 222 <div class="titlepage"></div> 223 <div xmlns="" class="refnamediv"> 224 <h1>eglQuerySurface</h1> 225 <p> 226 return <acronym xmlns="http://www.w3.org/1999/xhtml" class="acronym">EGL</acronym> surface information 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">eglQuerySurface</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">attribute</var>, </td> 246 </tr> 247 <tr valign="top"> 248 <td> </td> 249 <td>EGLint * <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">value</var><code>)</code></td> 250 </tr> 251 </table> 252 </div> 253 </div> 254 <div class="refsect1"> 255 <a id="parameters"></a> 256 <h2>Parameters</h2> 257 <div class="variablelist"> 258 <dl class="variablelist"> 259 <dt> 260 <span class="term"> 261 <em class="parameter"> 262 <code>display</code> 263 </em> 264 </span> 265 </dt> 266 <dd> 267 <p> 268 Specifies the EGL display connection. 269 </p> 270 </dd> 271 <dt> 272 <span class="term"> 273 <em class="parameter"> 274 <code>surface</code> 275 </em> 276 </span> 277 </dt> 278 <dd> 279 <p> 280 Specifies the EGL surface to query. 281 </p> 282 </dd> 283 <dt> 284 <span class="term"> 285 <em class="parameter"> 286 <code>attribute</code> 287 </em> 288 </span> 289 </dt> 290 <dd> 291 <p> 292 Specifies the EGL surface attribute to be returned. 293 </p> 294 </dd> 295 <dt> 296 <span class="term"> 297 <em class="parameter"> 298 <code>value</code> 299 </em> 300 </span> 301 </dt> 302 <dd> 303 <p> 304 Returns the requested value. 305 </p> 306 </dd> 307 </dl> 308 </div> 309 </div> 310 <div class="refsect1"> 311 <a id="description"></a> 312 <h2>Description</h2> 313 <p> 314 <code class="function">eglQuerySurface</code> returns in 315 <em class="parameter"><code>value</code></em> the value of 316 <em class="parameter"><code>attribute</code></em> for <em class="parameter"><code>surface</code></em>. 317 <em class="parameter"><code>attribute</code></em> can be one of the following: 318 </p> 319 <div class="variablelist"> 320 <dl class="variablelist"> 321 <dt> 322 <span class="term"> 323 <code class="constant">EGL_CONFIG_ID</code> 324 </span> 325 </dt> 326 <dd> 327 <p> 328 Returns the ID of the EGL frame buffer configuration 329 with respect to which the surface was created. 330 </p> 331 </dd> 332 <dt> 333 <span class="term"> 334 <code class="constant">EGL_HEIGHT</code> 335 </span> 336 </dt> 337 <dd> 338 <p> 339 Returns the height of the surface in pixels. 340 </p> 341 </dd> 342 <dt> 343 <span class="term"> 344 <code class="constant">EGL_HORIZONTAL_RESOLUTION</code> 345 </span> 346 </dt> 347 <dd> 348 <p> 349 Returns the horizontal dot pitch of the display on 350 which a window surface is visible. The value 351 returned is equal to the actual dot pitch, in 352 pixels/meter, multiplied by the constant value 353 <code class="constant">EGL_DISPLAY_SCALING</code>. 354 </p> 355 </dd> 356 <dt> 357 <span class="term"> 358 <code class="constant">EGL_LARGEST_PBUFFER</code> 359 </span> 360 </dt> 361 <dd> 362 <p> 363 Returns the same attribute value specified when the 364 surface was created with 365 <a class="citerefentry" href="eglCreatePbufferSurface.html"><span class="citerefentry"><span class="refentrytitle">eglCreatePbufferSurface</span></span></a>. 366 For a window or pixmap surface, 367 <em class="parameter"><code>value</code></em> is not modified. 368 </p> 369 </dd> 370 <dt> 371 <span class="term"> 372 <code class="constant">EGL_MIPMAP_LEVEL</code> 373 </span> 374 </dt> 375 <dd> 376 <p> 377 Returns which level of the mipmap to render to, if 378 texture has mipmaps. 379 </p> 380 </dd> 381 <dt> 382 <span class="term"> 383 <code class="constant">EGL_MIPMAP_TEXTURE</code> 384 </span> 385 </dt> 386 <dd> 387 <p> 388 Returns <code class="constant">EGL_TRUE</code> if texture has 389 mipmaps, <code class="constant">EGL_FALSE</code> otherwise. 390 </p> 391 </dd> 392 <dt> 393 <span class="term"> 394 <code class="constant">EGL_MULTISAMPLE_RESOLVE</code> 395 </span> 396 </dt> 397 <dd> 398 <p> 399 Returns the filter used when resolving the 400 multisample buffer. The filter may be either 401 <code class="constant">EGL_MULTISAMPLE_RESOLVE_DEFAULT</code> 402 or <code class="constant">EGL_MULTISAMPLE_RESOLVE_BOX</code>, 403 as described for 404 <a class="citerefentry" href="eglSurfaceAttrib.html"><span class="citerefentry"><span class="refentrytitle">eglSurfaceAttrib</span></span></a>. 405 </p> 406 </dd> 407 <dt> 408 <span class="term"> 409 <code class="constant">EGL_PIXEL_ASPECT_RATIO</code> 410 </span> 411 </dt> 412 <dd> 413 <p> 414 Returns the aspect ratio of an individual pixel (the 415 ratio of a pixel's width to its height). The value 416 returned is equal to the actual aspect ratio 417 multiplied by the constant value 418 <code class="constant">EGL_DISPLAY_SCALING</code>. 419 </p> 420 </dd> 421 <dt> 422 <span class="term"> 423 <code class="constant">EGL_RENDER_BUFFER</code> 424 </span> 425 </dt> 426 <dd> 427 <p> 428 Returns the buffer which client API rendering is 429 requested to use. For a window surface, this is the 430 same attribute value specified when the surface was 431 created. For a pbuffer surface, it is always 432 <code class="constant">EGL_BACK_BUFFER</code>. For a pixmap 433 surface, it is always 434 <code class="constant">EGL_SINGLE_BUFFER</code>. To determine 435 the actual buffer being rendered to by a context, 436 call 437 <a class="citerefentry" href="eglQueryContext.html"><span class="citerefentry"><span class="refentrytitle">eglQueryContext</span></span></a>. 438 </p> 439 </dd> 440 <dt> 441 <span class="term"> 442 <code class="constant">EGL_SWAP_BEHAVIOR</code> 443 </span> 444 </dt> 445 <dd> 446 <p> 447 Returns the effect on the color buffer when posting 448 a surface with 449 <a class="citerefentry" href="eglSwapBuffers.html"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a>. 450 Swap behavior may be either 451 <code class="constant">EGL_BUFFER_PRESERVED</code> or 452 <code class="constant">EGL_BUFFER_DESTROYED</code>, as 453 described for 454 <a class="citerefentry" href="eglSurfaceAttrib.html"><span class="citerefentry"><span class="refentrytitle">eglSurfaceAttrib</span></span></a>. 455 </p> 456 </dd> 457 <dt> 458 <span class="term"> 459 <code class="constant">EGL_TEXTURE_FORMAT</code> 460 </span> 461 </dt> 462 <dd> 463 <p> 464 Returns format of texture. Possible values are 465 <code class="constant">EGL_NO_TEXTURE</code>, 466 <code class="constant">EGL_TEXTURE_RGB</code>, and 467 <code class="constant">EGL_TEXTURE_RGBA</code>. 468 </p> 469 </dd> 470 <dt> 471 <span class="term"> 472 <code class="constant">EGL_TEXTURE_TARGET</code> 473 </span> 474 </dt> 475 <dd> 476 <p> 477 Returns type of texture. Possible values are 478 <code class="constant">EGL_NO_TEXTURE</code>, or 479 <code class="constant">EGL_TEXTURE_2D</code>. 480 </p> 481 </dd> 482 <dt> 483 <span class="term"> 484 <code class="constant">EGL_VERTICAL_RESOLUTION</code> 485 </span> 486 </dt> 487 <dd> 488 <p> 489 Returns the vertical dot pitch of the display on 490 which a window surface is visible. The value 491 returned is equal to the actual dot pitch, in 492 pixels/meter, multiplied by the constant value 493 <code class="constant">EGL_DISPLAY_SCALING</code>. 494 </p> 495 </dd> 496 <dt> 497 <span class="term"> 498 <code class="constant">EGL_WIDTH</code> 499 </span> 500 </dt> 501 <dd> 502 <p> 503 Returns the width of the surface in pixels. 504 </p> 505 </dd> 506 </dl> 507 </div> 508 </div> 509 <div class="refsect1"> 510 <a id="notes"></a> 511 <h2>Notes</h2> 512 <p> 513 Attribute <code class="constant">EGL_MULTISAMPLE_RESOLVE</code> is 514 supported only if the EGL version is 1.4 or greater. 515 </p> 516 <p> 517 Attributes <code class="constant">EGL_DISPLAY_SCALING</code>. 518 <code class="constant">EGL_HORIZONTAL_RESOLUTION</code>, 519 <code class="constant">EGL_PIXEL_ASPECT_RATIO</code>, 520 <code class="constant">EGL_RENDER_BUFFER</code>, 521 <code class="constant">EGL_SWAP_BEHAVIOR</code>, and 522 <code class="constant">EGL_VERTICAL_RESOLUTION</code> are supported 523 only if the EGL version is 1.2 or greater. 524 </p> 525 <p> 526 Querying attributes <code class="constant">EGL_TEXTURE_FORMAT</code>, 527 <code class="constant">EGL_TEXTURE_TARGET</code>, 528 <code class="constant">EGL_MIPMAP_TEXTURE</code>, or 529 <code class="constant">EGL_MIPMAP_LEVEL</code> for a non-pbuffer 530 surface is not an error, but <em class="parameter"><code>value</code></em> is 531 not modified. 532 </p> 533 <p> 534 <code class="constant">EGL_DISPLAY_SCALING</code> is the constant 535 value 10000. Floating-point values such as resolution and 536 pixel aspect ratio are scaled by this value before being 537 returned as integers so that sufficient precision to be 538 meaningful will be retained in the returned value. 539 </p> 540 <p> 541 For an offscreen (pbuffer or pixmap) surface, or a surface 542 whose pixel dot pitch or aspect ratio are unknown, querying 543 <code class="constant">EGL_HORIZONTAL_RESOLUTION</code>, 544 <code class="constant">EGL_PIXEL_ASPECT_RATIO</code>, or 545 <code class="constant">EGL_VERTICAL_RESOLUTION</code> will return the 546 constant value <code class="constant">EGL_UNKNOWN</code> (-1). 547 </p> 548 </div> 549 <div class="refsect1"> 550 <a id="errors"></a> 551 <h2>Errors</h2> 552 <p> 553 <code class="constant">EGL_FALSE</code> is returned on failure, 554 <code class="constant">EGL_TRUE</code> otherwise. 555 <em class="parameter"><code>value</code></em> is not modified when 556 <code class="constant">EGL_FALSE</code> is returned. 557 </p> 558 <p> 559 <code class="constant">EGL_BAD_DISPLAY</code> is generated if 560 <em class="parameter"><code>display</code></em> is not an EGL display connection. 561 </p> 562 <p> 563 <code class="constant">EGL_NOT_INITIALIZED</code> is generated if 564 <em class="parameter"><code>display</code></em> has not been initialized. 565 </p> 566 <p> 567 <code class="constant">EGL_BAD_SURFACE</code> is generated if 568 <em class="parameter"><code>surface</code></em> is not an EGL surface. 569 </p> 570 <p> 571 <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 572 <em class="parameter"><code>attribute</code></em> is not a valid surface attribute. 573 </p> 574 </div> 575 <div class="refsect1"> 576 <a id="seealso"></a> 577 <h2>See Also</h2> 578 <p> 579 <a class="citerefentry" href="eglCreatePbufferSurface.html"><span class="citerefentry"><span class="refentrytitle">eglCreatePbufferSurface</span></span></a>, 580 <a class="citerefentry" href="eglCreatePixmapSurface.html"><span class="citerefentry"><span class="refentrytitle">eglCreatePixmapSurface</span></span></a>, 581 <a class="citerefentry" href="eglCreateWindowSurface.html"><span class="citerefentry"><span class="refentrytitle">eglCreateWindowSurface</span></span></a>, 582 <a class="citerefentry" href="eglSurfaceAttrib.html"><span class="citerefentry"><span class="refentrytitle">eglSurfaceAttrib</span></span></a>, 583 <a class="citerefentry" href="eglSwapBuffers.html"><span class="citerefentry"><span class="refentrytitle">eglSwapBuffers</span></span></a> 584 </p> 585 </div> 586 <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> 587Copyright © 2003-2014 The Khronos Group Inc. 588Permission is hereby granted, free of charge, to any person obtaining a 589copy of this software and/or associated documentation files (the 590"Materials"), to deal in the Materials without restriction, including 591without limitation the rights to use, copy, modify, merge, publish, 592distribute, sublicense, and/or sell copies of the Materials, and to 593permit persons to whom the Materials are furnished to do so, subject to 594the condition that this copyright notice and permission notice shall be included 595in all copies or substantial portions of the Materials. 596</div> 597 </div> 598 </body> 599</html> 600