102f4aeb0Sopenharmony_ci<?xml version="1.0" encoding="UTF-8" standalone="no"?> 202f4aeb0Sopenharmony_ci<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"> 302f4aeb0Sopenharmony_ci <head> 402f4aeb0Sopenharmony_ci <title xmlns:xlink="http://www.w3.org/1999/xlink">eglCreatePbufferFromClientBuffer - EGL Reference Pages</title> 502f4aeb0Sopenharmony_ci <link rel="stylesheet" type="text/css" href="khronos-man.css"/> 602f4aeb0Sopenharmony_ci <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/> 702f4aeb0Sopenharmony_ci </head> 802f4aeb0Sopenharmony_ci <body> 902f4aeb0Sopenharmony_ci <header/> 1002f4aeb0Sopenharmony_ci <div class="refentry" id="eglCreatePbufferFromClientBuffer"> 1102f4aeb0Sopenharmony_ci <div class="titlepage"/> 1202f4aeb0Sopenharmony_ci <div class="refnamediv"> 1302f4aeb0Sopenharmony_ci <h2>Name</h2> 1402f4aeb0Sopenharmony_ci <p>eglCreatePbufferFromClientBuffer — 1502f4aeb0Sopenharmony_ci create a new <abbr class="acronym">EGL</abbr> pixel buffer surface 1602f4aeb0Sopenharmony_ci bound to an OpenVG image 1702f4aeb0Sopenharmony_ci </p> 1802f4aeb0Sopenharmony_ci </div> 1902f4aeb0Sopenharmony_ci <div class="refsynopsisdiv"> 2002f4aeb0Sopenharmony_ci <h2>C Specification</h2> 2102f4aeb0Sopenharmony_ci <div class="funcsynopsis"> 2202f4aeb0Sopenharmony_ci <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table"> 2302f4aeb0Sopenharmony_ci <tr> 2402f4aeb0Sopenharmony_ci <td> 2502f4aeb0Sopenharmony_ci <code class="funcdef">EGLSurface <strong class="fsfunc">eglCreatePbufferFromClientBuffer</strong>(</code> 2602f4aeb0Sopenharmony_ci </td> 2702f4aeb0Sopenharmony_ci <td>EGLDisplay <var class="pdparam">display</var>, </td> 2802f4aeb0Sopenharmony_ci </tr> 2902f4aeb0Sopenharmony_ci <tr> 3002f4aeb0Sopenharmony_ci <td> </td> 3102f4aeb0Sopenharmony_ci <td>EGLenum <var class="pdparam">buftype</var>, </td> 3202f4aeb0Sopenharmony_ci </tr> 3302f4aeb0Sopenharmony_ci <tr> 3402f4aeb0Sopenharmony_ci <td> </td> 3502f4aeb0Sopenharmony_ci <td>EGLClientBuffer <var class="pdparam">buffer</var>, </td> 3602f4aeb0Sopenharmony_ci </tr> 3702f4aeb0Sopenharmony_ci <tr> 3802f4aeb0Sopenharmony_ci <td> </td> 3902f4aeb0Sopenharmony_ci <td>EGLConfig <var class="pdparam">config</var>, </td> 4002f4aeb0Sopenharmony_ci </tr> 4102f4aeb0Sopenharmony_ci <tr> 4202f4aeb0Sopenharmony_ci <td> </td> 4302f4aeb0Sopenharmony_ci <td>EGLint const * <var class="pdparam">attrib_list</var><code>)</code>;</td> 4402f4aeb0Sopenharmony_ci </tr> 4502f4aeb0Sopenharmony_ci </table> 4602f4aeb0Sopenharmony_ci <div class="funcprototype-spacer"> </div> 4702f4aeb0Sopenharmony_ci </div> 4802f4aeb0Sopenharmony_ci </div> 4902f4aeb0Sopenharmony_ci <div class="refsect1" id="parameters"> 5002f4aeb0Sopenharmony_ci <h2>Parameters</h2> 5102f4aeb0Sopenharmony_ci <div class="variablelist"> 5202f4aeb0Sopenharmony_ci <dl class="variablelist"> 5302f4aeb0Sopenharmony_ci <dt> 5402f4aeb0Sopenharmony_ci <span class="term"> 5502f4aeb0Sopenharmony_ci <em class="parameter"> 5602f4aeb0Sopenharmony_ci <code>display</code> 5702f4aeb0Sopenharmony_ci </em> 5802f4aeb0Sopenharmony_ci </span> 5902f4aeb0Sopenharmony_ci </dt> 6002f4aeb0Sopenharmony_ci <dd> 6102f4aeb0Sopenharmony_ci <p>Specifies the EGL display connection.</p> 6202f4aeb0Sopenharmony_ci </dd> 6302f4aeb0Sopenharmony_ci <dt> 6402f4aeb0Sopenharmony_ci <span class="term"> 6502f4aeb0Sopenharmony_ci <em class="parameter"> 6602f4aeb0Sopenharmony_ci <code>buftype</code> 6702f4aeb0Sopenharmony_ci </em> 6802f4aeb0Sopenharmony_ci </span> 6902f4aeb0Sopenharmony_ci </dt> 7002f4aeb0Sopenharmony_ci <dd> 7102f4aeb0Sopenharmony_ci <p> 7202f4aeb0Sopenharmony_ci Specifies the type of client API buffer to be bound. 7302f4aeb0Sopenharmony_ci Must be <code class="constant">EGL_OPENVG_IMAGE</code>, 7402f4aeb0Sopenharmony_ci corresponding to an OpenVG <span class="type">VGImage</span> 7502f4aeb0Sopenharmony_ci buffer. 7602f4aeb0Sopenharmony_ci </p> 7702f4aeb0Sopenharmony_ci </dd> 7802f4aeb0Sopenharmony_ci <dt> 7902f4aeb0Sopenharmony_ci <span class="term"> 8002f4aeb0Sopenharmony_ci <em class="parameter"> 8102f4aeb0Sopenharmony_ci <code>buffer</code> 8202f4aeb0Sopenharmony_ci </em> 8302f4aeb0Sopenharmony_ci </span> 8402f4aeb0Sopenharmony_ci </dt> 8502f4aeb0Sopenharmony_ci <dd> 8602f4aeb0Sopenharmony_ci <p> 8702f4aeb0Sopenharmony_ci Specifies the OpenVG <span class="type">VGImage</span> handle of 8802f4aeb0Sopenharmony_ci the buffer to be bound. 8902f4aeb0Sopenharmony_ci </p> 9002f4aeb0Sopenharmony_ci </dd> 9102f4aeb0Sopenharmony_ci <dt> 9202f4aeb0Sopenharmony_ci <span class="term"> 9302f4aeb0Sopenharmony_ci <em class="parameter"> 9402f4aeb0Sopenharmony_ci <code>config</code> 9502f4aeb0Sopenharmony_ci </em> 9602f4aeb0Sopenharmony_ci </span> 9702f4aeb0Sopenharmony_ci </dt> 9802f4aeb0Sopenharmony_ci <dd> 9902f4aeb0Sopenharmony_ci <p> 10002f4aeb0Sopenharmony_ci Specifies the EGL frame buffer configuration that defines the 10102f4aeb0Sopenharmony_ci frame buffer resource available to the surface. 10202f4aeb0Sopenharmony_ci </p> 10302f4aeb0Sopenharmony_ci </dd> 10402f4aeb0Sopenharmony_ci <dt> 10502f4aeb0Sopenharmony_ci <span class="term"> 10602f4aeb0Sopenharmony_ci <em class="parameter"> 10702f4aeb0Sopenharmony_ci <code>attrib_list</code> 10802f4aeb0Sopenharmony_ci </em> 10902f4aeb0Sopenharmony_ci </span> 11002f4aeb0Sopenharmony_ci </dt> 11102f4aeb0Sopenharmony_ci <dd> 11202f4aeb0Sopenharmony_ci <p> 11302f4aeb0Sopenharmony_ci Specifies pixel buffer surface attributes. 11402f4aeb0Sopenharmony_ci May be <code class="constant">NULL</code> or empty 11502f4aeb0Sopenharmony_ci (first attribute is <code class="constant">EGL_NONE</code>). 11602f4aeb0Sopenharmony_ci </p> 11702f4aeb0Sopenharmony_ci </dd> 11802f4aeb0Sopenharmony_ci </dl> 11902f4aeb0Sopenharmony_ci </div> 12002f4aeb0Sopenharmony_ci </div> 12102f4aeb0Sopenharmony_ci <div class="refsect1" id="description"> 12202f4aeb0Sopenharmony_ci <h2>Description</h2> 12302f4aeb0Sopenharmony_ci <p> 12402f4aeb0Sopenharmony_ci <code class="function">eglCreatePbufferFromClientBuffer</code> creates an 12502f4aeb0Sopenharmony_ci off-screen pixel buffer surface and returns its handle. If 12602f4aeb0Sopenharmony_ci <code class="function">eglCreatePbufferFromClientBuffer</code> fails to create 12702f4aeb0Sopenharmony_ci a pixel buffer surface, <code class="constant">EGL_NO_SURFACE</code> 12802f4aeb0Sopenharmony_ci is returned. 12902f4aeb0Sopenharmony_ci </p> 13002f4aeb0Sopenharmony_ci <p> 13102f4aeb0Sopenharmony_ci The new pixel buffer surface is similar to a pixel buffer 13202f4aeb0Sopenharmony_ci created with 13302f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglCreatePbufferSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreatePbufferSurface</span></span></a>, 13402f4aeb0Sopenharmony_ci but storage for the color buffer is provided by a client API 13502f4aeb0Sopenharmony_ci buffer. Other buffer required by 13602f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em>, such as depth, stencil, and 13702f4aeb0Sopenharmony_ci alpha mask, are allocated by EGL. 13802f4aeb0Sopenharmony_ci </p> 13902f4aeb0Sopenharmony_ci <p> 14002f4aeb0Sopenharmony_ci <em class="parameter"><code>buftype</code></em> must be 14102f4aeb0Sopenharmony_ci <code class="constant">EGL_OPENVG_IMAGE</code>, corresponding to an 14202f4aeb0Sopenharmony_ci OpenVG <span class="type">VGImage</span> buffer. 14302f4aeb0Sopenharmony_ci <em class="parameter"><code>buffer</code></em> must be a valid 14402f4aeb0Sopenharmony_ci <span class="type">VGImage</span> handle in the current OpenVG context, 14502f4aeb0Sopenharmony_ci cast into the type <span class="type">EGLClientBuffer</span>. 14602f4aeb0Sopenharmony_ci </p> 14702f4aeb0Sopenharmony_ci <p> 14802f4aeb0Sopenharmony_ci The height, width,, OpenVG alpha format, and OpenVG 14902f4aeb0Sopenharmony_ci colorspace (surface attributes 15002f4aeb0Sopenharmony_ci <code class="constant">EGL_HEIGHT</code>, 15102f4aeb0Sopenharmony_ci <code class="constant">EGL_WIDTH</code>, 15202f4aeb0Sopenharmony_ci <code class="constant">EGL_VG_ALPHA_FORMAT</code>, and 15302f4aeb0Sopenharmony_ci <code class="constant">EGL_VG_COLORSPACE</code>, respectively) of the 15402f4aeb0Sopenharmony_ci resulting surface are determined by the size and format of 15502f4aeb0Sopenharmony_ci <em class="parameter"><code>buffer</code></em>. 15602f4aeb0Sopenharmony_ci </p> 15702f4aeb0Sopenharmony_ci <p> 15802f4aeb0Sopenharmony_ci Surface attributes are specified as a list of 15902f4aeb0Sopenharmony_ci attribute-value pairs, terminated with 16002f4aeb0Sopenharmony_ci <code class="constant">EGL_NONE</code>. Accepted attributes are: 16102f4aeb0Sopenharmony_ci </p> 16202f4aeb0Sopenharmony_ci <div class="variablelist"> 16302f4aeb0Sopenharmony_ci <dl class="variablelist"> 16402f4aeb0Sopenharmony_ci <dt> 16502f4aeb0Sopenharmony_ci <span class="term"> 16602f4aeb0Sopenharmony_ci <code class="constant">EGL_MIPMAP_TEXTURE</code> 16702f4aeb0Sopenharmony_ci </span> 16802f4aeb0Sopenharmony_ci </dt> 16902f4aeb0Sopenharmony_ci <dd> 17002f4aeb0Sopenharmony_ci <p> 17102f4aeb0Sopenharmony_ci Specifies whether storage for mipmaps should be 17202f4aeb0Sopenharmony_ci allocated. Space for mipmaps will be set aside if 17302f4aeb0Sopenharmony_ci the attribute value is <code class="constant">EGL_TRUE</code> 17402f4aeb0Sopenharmony_ci and <code class="constant">EGL_TEXTURE_FORMAT</code> is not 17502f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>. The default 17602f4aeb0Sopenharmony_ci value is <code class="constant">EGL_FALSE</code>. 17702f4aeb0Sopenharmony_ci </p> 17802f4aeb0Sopenharmony_ci </dd> 17902f4aeb0Sopenharmony_ci <dt> 18002f4aeb0Sopenharmony_ci <span class="term"> 18102f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_FORMAT</code> 18202f4aeb0Sopenharmony_ci </span> 18302f4aeb0Sopenharmony_ci </dt> 18402f4aeb0Sopenharmony_ci <dd> 18502f4aeb0Sopenharmony_ci <p> 18602f4aeb0Sopenharmony_ci Specifies the format of the texture that will be 18702f4aeb0Sopenharmony_ci created when a pbuffer is bound to a texture map. 18802f4aeb0Sopenharmony_ci Possible values are 18902f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>, 19002f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_RGB</code>, and 19102f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_RGBA</code>. The default 19202f4aeb0Sopenharmony_ci value is <code class="constant">EGL_NO_TEXTURE</code>. 19302f4aeb0Sopenharmony_ci </p> 19402f4aeb0Sopenharmony_ci </dd> 19502f4aeb0Sopenharmony_ci <dt> 19602f4aeb0Sopenharmony_ci <span class="term"> 19702f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_TARGET</code> 19802f4aeb0Sopenharmony_ci </span> 19902f4aeb0Sopenharmony_ci </dt> 20002f4aeb0Sopenharmony_ci <dd> 20102f4aeb0Sopenharmony_ci <p> 20202f4aeb0Sopenharmony_ci Specifies the target for the texture that will be 20302f4aeb0Sopenharmony_ci created when the pbuffer is created with a texture 20402f4aeb0Sopenharmony_ci format of <code class="constant">EGL_TEXTURE_RGB</code> or 20502f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_RGBA</code>. Possible 20602f4aeb0Sopenharmony_ci values are <code class="constant">EGL_NO_TEXTURE</code>, or 20702f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_2D</code>. The default 20802f4aeb0Sopenharmony_ci value is <code class="constant">EGL_NO_TEXTURE</code>. 20902f4aeb0Sopenharmony_ci </p> 21002f4aeb0Sopenharmony_ci </dd> 21102f4aeb0Sopenharmony_ci </dl> 21202f4aeb0Sopenharmony_ci </div> 21302f4aeb0Sopenharmony_ci <p> 21402f4aeb0Sopenharmony_ci Any EGL rendering context that was created with respect to 21502f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em> can be used to render into the 21602f4aeb0Sopenharmony_ci surface. Use 21702f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglMakeCurrent.xhtml"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a> 21802f4aeb0Sopenharmony_ci to attach an EGL rendering context to the surface. 21902f4aeb0Sopenharmony_ci </p> 22002f4aeb0Sopenharmony_ci <p> 22102f4aeb0Sopenharmony_ci Use 22202f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglQuerySurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 22302f4aeb0Sopenharmony_ci to retrieve the dimensions of the allocated pixel buffer 22402f4aeb0Sopenharmony_ci surface or the ID of <em class="parameter"><code>config</code></em>. 22502f4aeb0Sopenharmony_ci </p> 22602f4aeb0Sopenharmony_ci <p> 22702f4aeb0Sopenharmony_ci Use <a class="citerefentry" href="eglDestroySurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a> 22802f4aeb0Sopenharmony_ci to destroy the surface. 22902f4aeb0Sopenharmony_ci </p> 23002f4aeb0Sopenharmony_ci </div> 23102f4aeb0Sopenharmony_ci <div class="refsect1" id="notes"> 23202f4aeb0Sopenharmony_ci <h2>Notes</h2> 23302f4aeb0Sopenharmony_ci <p> 23402f4aeb0Sopenharmony_ci <code class="function">eglCreatePbufferFromClientBuffer</code> is 23502f4aeb0Sopenharmony_ci supported only if the EGL version is 1.2 or greater, and if 23602f4aeb0Sopenharmony_ci the EGL implementation supports the OpenVG client API. 23702f4aeb0Sopenharmony_ci </p> 23802f4aeb0Sopenharmony_ci <p> 23902f4aeb0Sopenharmony_ci Currently 24002f4aeb0Sopenharmony_ci <code class="function">eglCreatePbufferFromClientBuffer</code> only 24102f4aeb0Sopenharmony_ci supports binding OpenVG <span class="type">VGImage</span> buffers to 24202f4aeb0Sopenharmony_ci pixel buffers. While other client API resources could be 24302f4aeb0Sopenharmony_ci supported in the future, mechanisms such as OpenGL ES 24402f4aeb0Sopenharmony_ci framebuffer objects, and the family of EGL and client API 24502f4aeb0Sopenharmony_ci extensions for defining and using <span class="type">EGLImageKHR</span> 24602f4aeb0Sopenharmony_ci images, are a more flexible and general framework to satisfy 24702f4aeb0Sopenharmony_ci most of the same needs. 24802f4aeb0Sopenharmony_ci </p> 24902f4aeb0Sopenharmony_ci <p> 25002f4aeb0Sopenharmony_ci If the value of <em class="parameter"><code>config</code></em> attribute 25102f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_FORMAT</code> is not 25202f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>, then the pbuffer width 25302f4aeb0Sopenharmony_ci and height specify the size of the level zero texture image 25402f4aeb0Sopenharmony_ci </p> 25502f4aeb0Sopenharmony_ci <p> 25602f4aeb0Sopenharmony_ci If <code class="constant">EGL_LARGEST_PBUFFER</code> is specified and 25702f4aeb0Sopenharmony_ci if the pbuffer will be used as a texture (i.e. the value of 25802f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_TARGET</code> is 25902f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_2D</code>, and the value of 26002f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE FORMAT</code> is 26102f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_RGB</code> or 26202f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_RGBA</code>), then the aspect 26302f4aeb0Sopenharmony_ci ratio will be preserved and the new width and height will be 26402f4aeb0Sopenharmony_ci valid sizes for the texture target (e.g. if the underlying 26502f4aeb0Sopenharmony_ci OpenGL ES implementation does not support non-power-of-two 26602f4aeb0Sopenharmony_ci textures, both the width and height will be a power of 2). 26702f4aeb0Sopenharmony_ci </p> 26802f4aeb0Sopenharmony_ci <p> 26902f4aeb0Sopenharmony_ci The contents of the depth and stencil buffers may not be 27002f4aeb0Sopenharmony_ci preserved when rendering a texture to the pbuffer and 27102f4aeb0Sopenharmony_ci switching which image of the texture is rendered to (e.g., 27202f4aeb0Sopenharmony_ci switching from rendering one mipmap level to rendering 27302f4aeb0Sopenharmony_ci another). 27402f4aeb0Sopenharmony_ci </p> 27502f4aeb0Sopenharmony_ci <p> 27602f4aeb0Sopenharmony_ci Binding client API buffers to EGL pbuffers create the 27702f4aeb0Sopenharmony_ci possibility of race conditions, and of buffers being deleted 27802f4aeb0Sopenharmony_ci through one API while still in use in another API. To avoid 27902f4aeb0Sopenharmony_ci these problems, a number of constraints apply to bound 28002f4aeb0Sopenharmony_ci client API buffers: 28102f4aeb0Sopenharmony_ci </p> 28202f4aeb0Sopenharmony_ci <div class="orderedlist"> 28302f4aeb0Sopenharmony_ci <ol class="orderedlist" type="1"> 28402f4aeb0Sopenharmony_ci <li class="listitem"> 28502f4aeb0Sopenharmony_ci <p> 28602f4aeb0Sopenharmony_ci Bound buffers may be used exclusively by either EGL, 28702f4aeb0Sopenharmony_ci or the client API that originally created them. For 28802f4aeb0Sopenharmony_ci example, if a <span class="type">VGImage</span> is bound to a 28902f4aeb0Sopenharmony_ci pbuffer, and that pbuffer is bound to any client API 29002f4aeb0Sopenharmony_ci rendering context, then the <span class="type">VGImage</span> may 29102f4aeb0Sopenharmony_ci not be used as the explicit source or destination of 29202f4aeb0Sopenharmony_ci any OpenVG operation. Errors resulting from such use 29302f4aeb0Sopenharmony_ci are described in client API specifications. 29402f4aeb0Sopenharmony_ci Similarly, while a <span class="type">VGImage</span> is in use by 29502f4aeb0Sopenharmony_ci OpenVG, the pbuffer it is bound to may not be made 29602f4aeb0Sopenharmony_ci current to any client API context using 29702f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglMakeCurrent.xhtml"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>. 29802f4aeb0Sopenharmony_ci </p> 29902f4aeb0Sopenharmony_ci </li> 30002f4aeb0Sopenharmony_ci <li class="listitem"> 30102f4aeb0Sopenharmony_ci <p> 30202f4aeb0Sopenharmony_ci Binding a buffer creates an additional reference to 30302f4aeb0Sopenharmony_ci it, and implementations must respect outstanding 30402f4aeb0Sopenharmony_ci references when destroying objects. For example, if 30502f4aeb0Sopenharmony_ci a <span class="type">VGImage</span> is bound to a pbuffer, 30602f4aeb0Sopenharmony_ci destroying the image with 30702f4aeb0Sopenharmony_ci <code class="function">vgDestroyImage</code> will not free 30802f4aeb0Sopenharmony_ci the underlying buffer, because it is still in use by 30902f4aeb0Sopenharmony_ci EGL. However, following 31002f4aeb0Sopenharmony_ci <code class="function">vgDestroyImage</code> the buffer may 31102f4aeb0Sopenharmony_ci only be referred to via the EGL pbuffer handle, 31202f4aeb0Sopenharmony_ci since the OpenVG handle to that buffer no longer 31302f4aeb0Sopenharmony_ci exists. Similarly, destroying the pbuffer with 31402f4aeb0Sopenharmony_ci <code class="function">eglDestroySurface</code> will not free 31502f4aeb0Sopenharmony_ci the underlying buffer, because it is still in use by 31602f4aeb0Sopenharmony_ci OpenVG . However, following 31702f4aeb0Sopenharmony_ci <code class="function">eglDestroySurface</code> the buffer 31802f4aeb0Sopenharmony_ci may only be referred to via the OpenVG 31902f4aeb0Sopenharmony_ci <span class="type">VGImage</span> handle, since the EGL pbuffer 32002f4aeb0Sopenharmony_ci handle no longer exists. 32102f4aeb0Sopenharmony_ci </p> 32202f4aeb0Sopenharmony_ci </li> 32302f4aeb0Sopenharmony_ci </ol> 32402f4aeb0Sopenharmony_ci </div> 32502f4aeb0Sopenharmony_ci <p> 32602f4aeb0Sopenharmony_ci </p> 32702f4aeb0Sopenharmony_ci </div> 32802f4aeb0Sopenharmony_ci <div class="refsect1" id="errors"> 32902f4aeb0Sopenharmony_ci <h2>Errors</h2> 33002f4aeb0Sopenharmony_ci <p> 33102f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_SURFACE</code> is returned if creation of 33202f4aeb0Sopenharmony_ci the context fails. 33302f4aeb0Sopenharmony_ci </p> 33402f4aeb0Sopenharmony_ci <p> 33502f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_DISPLAY</code> is generated if 33602f4aeb0Sopenharmony_ci <em class="parameter"><code>display</code></em> is not an EGL display connection. 33702f4aeb0Sopenharmony_ci </p> 33802f4aeb0Sopenharmony_ci <p> 33902f4aeb0Sopenharmony_ci <code class="constant">EGL_NOT_INITIALIZED</code> is generated if 34002f4aeb0Sopenharmony_ci <em class="parameter"><code>display</code></em> has not been initialized. 34102f4aeb0Sopenharmony_ci </p> 34202f4aeb0Sopenharmony_ci <p> 34302f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_CONFIG</code> is generated if 34402f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em> is not an EGL frame buffer configuration. 34502f4aeb0Sopenharmony_ci </p> 34602f4aeb0Sopenharmony_ci <p> 34702f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_PARAMETER</code> is generated if 34802f4aeb0Sopenharmony_ci <em class="parameter"><code>buftype</code></em> is not 34902f4aeb0Sopenharmony_ci <code class="constant">EGL_OPENVG_IMAGE</code>, or if 35002f4aeb0Sopenharmony_ci <em class="parameter"><code>buffer</code></em> is not a valid handle to a 35102f4aeb0Sopenharmony_ci <span class="type">VGImage</span> object in the currently bound OpenVG 35202f4aeb0Sopenharmony_ci context. 35302f4aeb0Sopenharmony_ci </p> 35402f4aeb0Sopenharmony_ci <p> 35502f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_ACCESS</code> is generated if there is 35602f4aeb0Sopenharmony_ci no current OpenVG context, or if 35702f4aeb0Sopenharmony_ci <em class="parameter"><code>buffer</code></em> is already bound to another 35802f4aeb0Sopenharmony_ci pixel buffer or in use by OpenVG as discussed in the Notes 35902f4aeb0Sopenharmony_ci section above. 36002f4aeb0Sopenharmony_ci </p> 36102f4aeb0Sopenharmony_ci <p> 36202f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_ACCESS</code> is generated if the buffers 36302f4aeb0Sopenharmony_ci contained in <em class="parameter"><code>buffer</code></em> consist of any 36402f4aeb0Sopenharmony_ci <span class="type">EGLImage</span> siblings. 36502f4aeb0Sopenharmony_ci </p> 36602f4aeb0Sopenharmony_ci <p> 36702f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_ALLOC</code> is generated if there are not 36802f4aeb0Sopenharmony_ci enough resources to allocate the new surface. 36902f4aeb0Sopenharmony_ci </p> 37002f4aeb0Sopenharmony_ci <p> 37102f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 37202f4aeb0Sopenharmony_ci <em class="parameter"><code>attrib_list</code></em> contains an invalid pixel 37302f4aeb0Sopenharmony_ci buffer attribute or if an attribute value is not recognized 37402f4aeb0Sopenharmony_ci or out of range. 37502f4aeb0Sopenharmony_ci </p> 37602f4aeb0Sopenharmony_ci <p> 37702f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if 37802f4aeb0Sopenharmony_ci <em class="parameter"><code>attrib_list</code></em> contains any of the 37902f4aeb0Sopenharmony_ci attributes <code class="constant">EGL_MIPMAP_TEXTURE</code>, 38002f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_FORMAT</code>, or 38102f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_TARGET</code>, and 38202f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em> does not support OpenGL ES 38302f4aeb0Sopenharmony_ci rendering (e.g. the EGL version is 1.2 or later, and the 38402f4aeb0Sopenharmony_ci <code class="constant">EGL_RENDERABLE_TYPE</code> attribute of 38502f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em> does not include at least one 38602f4aeb0Sopenharmony_ci of <code class="constant">EGL_OPENGL_ES_BIT</code> or 38702f4aeb0Sopenharmony_ci <code class="constant">EGL_OPENGL_ES2_BIT</code>). 38802f4aeb0Sopenharmony_ci </p> 38902f4aeb0Sopenharmony_ci <p> 39002f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_MATCH</code> is generated if 39102f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em> does not support rendering to 39202f4aeb0Sopenharmony_ci pixel buffers (the <code class="constant">EGL_SURFACE_TYPE</code> 39302f4aeb0Sopenharmony_ci attribute does not contain 39402f4aeb0Sopenharmony_ci <code class="constant">EGL_PBUFFER_BIT</code>). 39502f4aeb0Sopenharmony_ci </p> 39602f4aeb0Sopenharmony_ci <p> 39702f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_MATCH</code> is generated if the 39802f4aeb0Sopenharmony_ci buffers contained in <em class="parameter"><code>buffer</code></em> do not 39902f4aeb0Sopenharmony_ci match the bit depths for those buffers specified by 40002f4aeb0Sopenharmony_ci <em class="parameter"><code>config</code></em>. 40102f4aeb0Sopenharmony_ci </p> 40202f4aeb0Sopenharmony_ci <p> 40302f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_MATCH</code> is generated if the 40402f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_FORMAT</code> attribute is not 40502f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>, and 40602f4aeb0Sopenharmony_ci <code class="constant">EGL_WIDTH</code> and/or 40702f4aeb0Sopenharmony_ci <code class="constant">EGL_HEIGHT</code> specify an invalid size 40802f4aeb0Sopenharmony_ci (e.g., the texture size is not a power of 2, and the 40902f4aeb0Sopenharmony_ci underlying OpenGL ES implementation does not support 41002f4aeb0Sopenharmony_ci non-power-of-two textures). 41102f4aeb0Sopenharmony_ci </p> 41202f4aeb0Sopenharmony_ci <p> 41302f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_MATCH</code> is generated if 41402f4aeb0Sopenharmony_ci the <code class="constant">EGL_TEXTURE_FORMAT</code> attribute is 41502f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>, and 41602f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_TARGET</code> is something other 41702f4aeb0Sopenharmony_ci than <code class="constant">EGL_NO_TEXTURE</code>; or, 41802f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_FORMAT</code> is something other 41902f4aeb0Sopenharmony_ci than <code class="constant">EGL_NO_TEXTURE</code>, and 42002f4aeb0Sopenharmony_ci <code class="constant">EGL_TEXTURE_TARGET</code> is 42102f4aeb0Sopenharmony_ci <code class="constant">EGL_NO_TEXTURE</code>. 42202f4aeb0Sopenharmony_ci </p> 42302f4aeb0Sopenharmony_ci <p> 42402f4aeb0Sopenharmony_ci <code class="constant">EGL_BAD_MATCH</code> is generated if the 42502f4aeb0Sopenharmony_ci implementation has additional constraints on which types of 42602f4aeb0Sopenharmony_ci client API buffers may be bound to pixel buffer surfaces. 42702f4aeb0Sopenharmony_ci For example, it is possible that the OpenVG implementation 42802f4aeb0Sopenharmony_ci might not support a <span class="type">VGImage</span> being bound to a 42902f4aeb0Sopenharmony_ci pixel buffer which will be used as a mipmapped OpenGL ES 43002f4aeb0Sopenharmony_ci texture (e.g. whose <code class="constant">EGL_MIPMAP_TEXTURE</code> 43102f4aeb0Sopenharmony_ci attribute is <code class="constant">TRUE</code>). Any such 43202f4aeb0Sopenharmony_ci constraints should be documented by the implementation 43302f4aeb0Sopenharmony_ci release notes. 43402f4aeb0Sopenharmony_ci </p> 43502f4aeb0Sopenharmony_ci </div> 43602f4aeb0Sopenharmony_ci <div class="refsect1" id="seealso"> 43702f4aeb0Sopenharmony_ci <h2>See Also</h2> 43802f4aeb0Sopenharmony_ci <p> 43902f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglDestroySurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a>, 44002f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglChooseConfig.xhtml"><span class="citerefentry"><span class="refentrytitle">eglChooseConfig</span></span></a>, 44102f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglCreatePbufferSurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreatePbufferSurface</span></span></a>, 44202f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglGetConfigs.xhtml"><span class="citerefentry"><span class="refentrytitle">eglGetConfigs</span></span></a>, 44302f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglMakeCurrent.xhtml"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>, 44402f4aeb0Sopenharmony_ci <a class="citerefentry" href="eglQuerySurface.xhtml"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a> 44502f4aeb0Sopenharmony_ci </p> 44602f4aeb0Sopenharmony_ci </div> 44702f4aeb0Sopenharmony_ci <p> 44802f4aeb0Sopenharmony_ci </p> 44902f4aeb0Sopenharmony_ci <div class="refsect3" id="copyright"> 45002f4aeb0Sopenharmony_ci <img src="KhronosLogo.jpg"/> 45102f4aeb0Sopenharmony_ci <p> 45202f4aeb0Sopenharmony_ci Copyright © 2003-2014 The Khronos Group Inc. 45302f4aeb0Sopenharmony_ci Permission is hereby granted, free of charge, to any person obtaining a 45402f4aeb0Sopenharmony_ci copy of this software and/or associated documentation files (the 45502f4aeb0Sopenharmony_ci "Materials"), to deal in the Materials without restriction, including 45602f4aeb0Sopenharmony_ci without limitation the rights to use, copy, modify, merge, publish, 45702f4aeb0Sopenharmony_ci distribute, sublicense, and/or sell copies of the Materials, and to 45802f4aeb0Sopenharmony_ci permit persons to whom the Materials are furnished to do so, subject to 45902f4aeb0Sopenharmony_ci the condition that this copyright notice and permission notice shall be included 46002f4aeb0Sopenharmony_ci in all copies or substantial portions of the Materials. 46102f4aeb0Sopenharmony_ci </p> 46202f4aeb0Sopenharmony_ci </div> 46302f4aeb0Sopenharmony_ci <p> 46402f4aeb0Sopenharmony_ci</p> 46502f4aeb0Sopenharmony_ci </div> 46602f4aeb0Sopenharmony_ci <footer/> 46702f4aeb0Sopenharmony_ci </body> 46802f4aeb0Sopenharmony_ci</html> 469