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>eglCreatePbufferSurface</title> 217 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /> 218 </head> 219 <body> 220 <div class="refentry"> 221 <a id="eglCreatePbufferSurface"></a> 222 <div class="titlepage"></div> 223 <div xmlns="" class="refnamediv"> 224 <h1>eglCreatePbufferSurface</h1> 225 <p> 226 create a new <acronym xmlns="http://www.w3.org/1999/xhtml" class="acronym">EGL</acronym> pixel buffer surface 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">EGLSurface <strong class="fsfunc">eglCreatePbufferSurface</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>EGLConfig <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">config</var>, </td> 242 </tr> 243 <tr valign="top"> 244 <td> </td> 245 <td>EGLint const * <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">attrib_list</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>config</code> 269 </em> 270 </span> 271 </dt> 272 <dd> 273 <p> 274 Specifies the EGL frame buffer configuration that defines the 275 frame buffer resource available to the surface. 276 </p> 277 </dd> 278 <dt> 279 <span class="term"> 280 <em class="parameter"> 281 <code>attrib_list</code> 282 </em> 283 </span> 284 </dt> 285 <dd> 286 <p> 287 Specifies pixel buffer surface attributes. 288 May be <code class="constant">NULL</code> or empty 289 (first attribute is <code class="constant">EGL_NONE</code>). 290 </p> 291 </dd> 292 </dl> 293 </div> 294 </div> 295 <div class="refsect1"> 296 <a id="description"></a> 297 <h2>Description</h2> 298 <p> 299 <code class="function">eglCreatePbufferSurface</code> creates an 300 off-screen pixel buffer surface and returns its handle. If 301 <code class="function">eglCreatePbufferSurface</code> fails to create 302 a pixel buffer surface, <code class="constant">EGL_NO_SURFACE</code> 303 is returned. 304 </p> 305 <p> 306 Surface attributes are specified as a list of 307 attribute-value pairs, terminated with 308 <code class="constant">EGL_NONE</code>. Accepted attributes 309 are: 310 </p> 311 <div class="variablelist"> 312 <dl class="variablelist"> 313 <dt> 314 <span class="term"> 315 <code class="constant">EGL_HEIGHT</code> 316 </span> 317 </dt> 318 <dd> 319 <p> 320 Specifies the required height of the pixel buffer 321 surface. The default value is 322 <code class="constant">0</code>. 323 </p> 324 </dd> 325 <dt> 326 <span class="term"> 327 <code class="constant">EGL_LARGEST_PBUFFER</code> 328 </span> 329 </dt> 330 <dd> 331 <p> 332 Requests the largest available pixel buffer surface 333 when the allocation would otherwise fail. Use 334 <a class="citerefentry" href="eglQuerySurface.html"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 335 to retrieve the dimensions of the allocated pixel 336 buffer. The default value is 337 <code class="constant">EGL_FALSE</code>. 338 </p> 339 </dd> 340 <dt> 341 <span class="term"> 342 <code class="constant">EGL_MIPMAP_TEXTURE</code> 343 </span> 344 </dt> 345 <dd> 346 <p> 347 Specifies whether storage for mipmaps should be 348 allocated. Space for mipmaps will be set aside if 349 the attribute value is <code class="constant">EGL_TRUE</code> 350 and <code class="constant">EGL_TEXTURE_FORMAT</code> is not 351 <code class="constant">EGL_NO_TEXTURE</code>. The default 352 value is <code class="constant">EGL_FALSE</code>. 353 </p> 354 </dd> 355 <dt> 356 <span class="term"> 357 <code class="constant">EGL_TEXTURE_FORMAT</code> 358 </span> 359 </dt> 360 <dd> 361 <p> 362 Specifies the format of the texture that will be 363 created when a pbuffer is bound to a texture map. 364 Possible values are 365 <code class="constant">EGL_NO_TEXTURE</code>, 366 <code class="constant">EGL_TEXTURE_RGB</code>, and 367 <code class="constant">EGL_TEXTURE_RGBA</code>. The default 368 value is <code class="constant">EGL_NO_TEXTURE</code>. 369 </p> 370 </dd> 371 <dt> 372 <span class="term"> 373 <code class="constant">EGL_TEXTURE_TARGET</code> 374 </span> 375 </dt> 376 <dd> 377 <p> 378 Specifies the target for the texture that will be 379 created when the pbuffer is created with a texture 380 format of <code class="constant">EGL_TEXTURE_RGB</code> or 381 <code class="constant">EGL_TEXTURE_RGBA</code>. Possible 382 values are <code class="constant">EGL_NO_TEXTURE</code>, or 383 <code class="constant">EGL_TEXTURE_2D</code>. The default 384 value is <code class="constant">EGL_NO_TEXTURE</code>. 385 </p> 386 </dd> 387 <dt> 388 <span class="term"> 389 <code class="constant">EGL_VG_ALPHA_FORMAT</code> 390 </span> 391 </dt> 392 <dd> 393 <p> 394 Specifies how alpha values are interpreted by OpenVG 395 when rendering to the surface. If its value is 396 <code class="constant">EGL_VG_ALPHA_FORMAT_NONPRE</code>, 397 then alpha values are not premultipled. If its value 398 is <code class="constant">EGL_VG_ALPHA_FORMAT_PRE</code>, 399 then alpha values are premultiplied. The default 400 value of <code class="constant">EGL_VG_ALPHA_FORMAT</code> is 401 <code class="constant">EGL_VG_ALPHA_FORMAT_NONPRE</code>. 402 </p> 403 </dd> 404 <dt> 405 <span class="term"> 406 <code class="constant">EGL_VG_COLORSPACE</code> 407 </span> 408 </dt> 409 <dd> 410 <p> 411 Specifies the color space used by OpenVG when 412 rendering to the surface. If its value is 413 <code class="constant">EGL_VG_COLORSPACE_sRGB</code>, then a 414 non-linear, perceptually uniform color space is 415 assumed, with a corresponding 416 <span class="type">VGImageFormat</span> of form 417 <code class="constant">VG_s*</code>. If its value is 418 <code class="constant">EGL_VG_COLORSPACE_LINEAR</code>, then 419 a linear color space is assumed, with a 420 corresponding <span class="type">VGImageFormat</span> of form 421 <code class="constant">VG_l*</code>. The default value of 422 <code class="constant">EGL_VG_COLORSPACE</code> is 423 <code class="constant">EGL_VG_COLORSPACE_sRGB</code>. 424 </p> 425 </dd> 426 <dt> 427 <span class="term"> 428 <code class="constant">EGL_WIDTH</code> 429 </span> 430 </dt> 431 <dd> 432 <p> 433 Specifies the required width of the pixel buffer 434 surface. The default value is 435 <code class="constant">0</code>. 436 </p> 437 </dd> 438 </dl> 439 </div> 440 <p> 441 Any EGL rendering context that was created with respect to 442 <em class="parameter"><code>config</code></em> can be used to render into the 443 surface. Use 444 <a class="citerefentry" href="eglMakeCurrent.html"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a> 445 to attach an EGL rendering context to the surface. 446 </p> 447 <p> 448 Use 449 <a class="citerefentry" href="eglQuerySurface.html"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 450 to retrieve the dimensions of the allocated pixel buffer 451 surface or the ID of <em class="parameter"><code>config</code></em>. 452 </p> 453 <p> 454 Use <a class="citerefentry" href="eglDestroySurface.html"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a> 455 to destroy the surface. 456 </p> 457 </div> 458 <div class="refsect1"> 459 <a id="notes"></a> 460 <h2>Notes</h2> 461 <p> 462 Attributes 463 <code class="constant">EGL_RENDERABLE_TYPE</code>, 464 <code class="constant">EGL_VG_ALPHA_FORMAT</code>, and 465 <code class="constant">EGL_VG_COLORSPACE</code>, and the 466 corresponding attribute values, are supported only if the 467 EGL version is 1.2 or greater. 468 </p> 469 <p> 470 If the value of <em class="parameter"><code>config</code></em> attribute 471 <code class="constant">EGL_TEXTURE_FORMAT</code> is not 472 <code class="constant">EGL_NO_TEXTURE</code>, then the pbuffer width 473 and height specify the size of the level zero texture image 474 </p> 475 <p> 476 If <code class="constant">EGL_LARGEST_PBUFFER</code> is specified and 477 if the pbuffer will be used as a texture (i.e. the value of 478 <code class="constant">EGL_TEXTURE_TARGET</code> is 479 <code class="constant">EGL_TEXTURE_2D</code>, and the value of 480 <code class="constant">EGL_TEXTURE FORMAT</code> is 481 <code class="constant">EGL_TEXTURE_RGB</code> or 482 <code class="constant">EGL_TEXTURE_RGBA</code>), then the aspect 483 ratio will be preserved and the new width and height will be 484 valid sizes for the texture target (e.g. if the underlying 485 OpenGL ES implementation does not support non-power-of-two 486 textures, both the width and height will be a power of 2). 487 </p> 488 <p> 489 The contents of the depth and stencil buffers may not be 490 preserved when rendering a texture to the pbuffer and 491 switching which image of the texture is rendered to (e.g., 492 switching from rendering one mipmap level to rendering 493 another). 494 </p> 495 </div> 496 <div class="refsect1"> 497 <a id="errors"></a> 498 <h2>Errors</h2> 499 <p> 500 <code class="constant">EGL_NO_SURFACE</code> is returned if creation of 501 the context fails. 502 </p> 503 <p> 504 <code class="constant">EGL_BAD_DISPLAY</code> is generated if 505 <em class="parameter"><code>display</code></em> is not an EGL display connection. 506 </p> 507 <p> 508 <code class="constant">EGL_NOT_INITIALIZED</code> is generated if 509 <em class="parameter"><code>display</code></em> has not been initialized. 510 </p> 511 <p> 512 <code class="constant">EGL_BAD_CONFIG</code> is generated if 513 <em class="parameter"><code>config</code></em> is not an EGL frame buffer configuration. 514 </p> 515 <p> 516 <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 517 <em class="parameter"><code>attrib_list</code></em> contains an invalid pixel 518 buffer attribute or if an attribute value is not recognized 519 or out of range. 520 </p> 521 <p> 522 <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 523 <em class="parameter"><code>attrib_list</code></em> contains any of the 524 attributes <code class="constant">EGL_MIPMAP_TEXTURE</code>, 525 <code class="constant">EGL_TEXTURE_FORMAT</code>, or 526 <code class="constant">EGL_TEXTURE_TARGET</code>, and 527 <em class="parameter"><code>config</code></em> does not support OpenGL ES 528 rendering (e.g. the EGL version is 1.2 or later, and the 529 <code class="constant">EGL_RENDERABLE_TYPE</code> attribute of 530 <em class="parameter"><code>config</code></em> does not include at least one 531 of <code class="constant">EGL_OPENGL_ES_BIT</code> or 532 <code class="constant">EGL_OPENGL_ES2_BIT</code>). 533 </p> 534 <p> 535 <code class="constant">EGL_BAD_ALLOC</code> is generated if there are not 536 enough resources to allocate the new surface. 537 </p> 538 <p> 539 <code class="constant">EGL_BAD_MATCH</code> is generated if 540 <em class="parameter"><code>config</code></em> does not support rendering to pixel buffers 541 (the <code class="constant">EGL_SURFACE_TYPE</code> attribute does not contain 542 <code class="constant">EGL_PBUFFER_BIT</code>). 543 </p> 544 <p> 545 <code class="constant">EGL_BAD_MATCH</code> is generated if the 546 <code class="constant">EGL_TEXTURE_FORMAT</code> attribute is not 547 <code class="constant">EGL_NO_TEXTURE</code>, and 548 <code class="constant">EGL_WIDTH</code> and/or 549 <code class="constant">EGL_HEIGHT</code> specify an invalid size 550 (e.g., the texture size is not a power of 2, and the 551 underlying OpenGL ES implementation does not support 552 non-power-of-two textures). 553 </p> 554 <p> 555 <code class="constant">EGL_BAD_MATCH</code> is generated if 556 the <code class="constant">EGL_TEXTURE_FORMAT</code> attribute is 557 <code class="constant">EGL_NO_TEXTURE</code>, and 558 <code class="constant">EGL_TEXTURE_TARGET</code> is something other 559 than <code class="constant">EGL_NO_TEXTURE</code>; or, 560 <code class="constant">EGL_TEXTURE_FORMAT</code> is something other 561 than <code class="constant">EGL_NO_TEXTURE</code>, and 562 <code class="constant">EGL_TEXTURE_TARGET</code> is 563 <code class="constant">EGL_NO_TEXTURE</code>. 564 </p> 565 <p> 566 <code class="constant">EGL_BAD_MATCH</code> is generated if 567 <em class="parameter"><code>config</code></em> does not support the specified 568 OpenVG alpha format attribute (the value of 569 <code class="constant">EGL_VG_ALPHA_FORMAT</code> is 570 <code class="constant">EGL_VG_ALPHA_FORMAT_PRE</code> and the 571 <code class="constant">EGL_VG_ALPHA_FORMAT_PRE_BIT</code> is not set 572 in the <code class="constant">EGL_SURFACE_TYPE</code> attribute of 573 <em class="parameter"><code>config</code></em>) or colorspace attribute (the 574 value of <code class="constant">EGL_VG_COLORSPACE</code> is 575 <code class="constant">EGL_VG_COLORSPACE_LINEAR</code> and the 576 <code class="constant">EGL_VG_COLORSPACE_LINEAR_IT</code> is not set 577 in the <code class="constant">EGL_SURFACE_TYPE</code> attribute of 578 <em class="parameter"><code>config</code></em>). 579 </p> 580 </div> 581 <div class="refsect1"> 582 <a id="seealso"></a> 583 <h2>See Also</h2> 584 <p> 585 <a class="citerefentry" href="eglDestroySurface.html"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a>, 586 <a class="citerefentry" href="eglChooseConfig.html"><span class="citerefentry"><span class="refentrytitle">eglChooseConfig</span></span></a>, 587 <a class="citerefentry" href="eglGetConfigs.html"><span class="citerefentry"><span class="refentrytitle">eglGetConfigs</span></span></a>, 588 <a class="citerefentry" href="eglMakeCurrent.html"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>, 589 <a class="citerefentry" href="eglQuerySurface.html"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 590 </p> 591 </div> 592 <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> 593Copyright © 2003-2014 The Khronos Group Inc. 594Permission is hereby granted, free of charge, to any person obtaining a 595copy of this software and/or associated documentation files (the 596"Materials"), to deal in the Materials without restriction, including 597without limitation the rights to use, copy, modify, merge, publish, 598distribute, sublicense, and/or sell copies of the Materials, and to 599permit persons to whom the Materials are furnished to do so, subject to 600the condition that this copyright notice and permission notice shall be included 601in all copies or substantial portions of the Materials. 602</div> 603 </div> 604 </body> 605</html> 606