102f4aeb0Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 202f4aeb0Sopenharmony_ci<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" 302f4aeb0Sopenharmony_ci "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> 402f4aeb0Sopenharmony_ci<refentry xml:base="" id="eglCreatePbufferFromClientBuffer"> 502f4aeb0Sopenharmony_ci <refentryinfo> 602f4aeb0Sopenharmony_ci <copyright> 702f4aeb0Sopenharmony_ci <year>2003-2014</year> 802f4aeb0Sopenharmony_ci <holder>The Khronos Group Inc.</holder> 902f4aeb0Sopenharmony_ci </copyright> 1002f4aeb0Sopenharmony_ci </refentryinfo> 1102f4aeb0Sopenharmony_ci <refmeta> 1202f4aeb0Sopenharmony_ci <refentrytitle>eglCreatePbufferFromClientBuffer</refentrytitle> 1302f4aeb0Sopenharmony_ci <manvolnum>3G</manvolnum> 1402f4aeb0Sopenharmony_ci </refmeta> 1502f4aeb0Sopenharmony_ci <refnamediv> 1602f4aeb0Sopenharmony_ci <refname>eglCreatePbufferFromClientBuffer</refname> 1702f4aeb0Sopenharmony_ci <refpurpose> 1802f4aeb0Sopenharmony_ci create a new <acronym>EGL</acronym> pixel buffer surface 1902f4aeb0Sopenharmony_ci bound to an OpenVG image 2002f4aeb0Sopenharmony_ci </refpurpose> 2102f4aeb0Sopenharmony_ci </refnamediv> 2202f4aeb0Sopenharmony_ci <refsynopsisdiv> 2302f4aeb0Sopenharmony_ci <title>C Specification</title> 2402f4aeb0Sopenharmony_ci <funcsynopsis> 2502f4aeb0Sopenharmony_ci <funcprototype> 2602f4aeb0Sopenharmony_ci <funcdef>EGLSurface <function>eglCreatePbufferFromClientBuffer</function></funcdef> 2702f4aeb0Sopenharmony_ci <paramdef>EGLDisplay <parameter>display</parameter></paramdef> 2802f4aeb0Sopenharmony_ci <paramdef>EGLenum <parameter>buftype</parameter></paramdef> 2902f4aeb0Sopenharmony_ci <paramdef>EGLClientBuffer <parameter>buffer</parameter></paramdef> 3002f4aeb0Sopenharmony_ci <paramdef>EGLConfig <parameter>config</parameter></paramdef> 3102f4aeb0Sopenharmony_ci <paramdef>EGLint const * <parameter>attrib_list</parameter></paramdef> 3202f4aeb0Sopenharmony_ci </funcprototype> 3302f4aeb0Sopenharmony_ci </funcsynopsis> 3402f4aeb0Sopenharmony_ci </refsynopsisdiv> 3502f4aeb0Sopenharmony_ci <refsect1 id="parameters"><title>Parameters</title> 3602f4aeb0Sopenharmony_ci <variablelist> 3702f4aeb0Sopenharmony_ci <varlistentry> 3802f4aeb0Sopenharmony_ci <term><parameter>display</parameter></term> 3902f4aeb0Sopenharmony_ci <listitem><para>Specifies the EGL display connection.</para></listitem> 4002f4aeb0Sopenharmony_ci </varlistentry> 4102f4aeb0Sopenharmony_ci <varlistentry> 4202f4aeb0Sopenharmony_ci <term><parameter>buftype</parameter></term> 4302f4aeb0Sopenharmony_ci <listitem> 4402f4aeb0Sopenharmony_ci <para> 4502f4aeb0Sopenharmony_ci Specifies the type of client API buffer to be bound. 4602f4aeb0Sopenharmony_ci Must be <constant>EGL_OPENVG_IMAGE</constant>, 4702f4aeb0Sopenharmony_ci corresponding to an OpenVG <type>VGImage</type> 4802f4aeb0Sopenharmony_ci buffer. 4902f4aeb0Sopenharmony_ci </para> 5002f4aeb0Sopenharmony_ci </listitem> 5102f4aeb0Sopenharmony_ci </varlistentry> 5202f4aeb0Sopenharmony_ci <varlistentry> 5302f4aeb0Sopenharmony_ci <term><parameter>buffer</parameter></term> 5402f4aeb0Sopenharmony_ci <listitem> 5502f4aeb0Sopenharmony_ci <para> 5602f4aeb0Sopenharmony_ci Specifies the OpenVG <type>VGImage</type> handle of 5702f4aeb0Sopenharmony_ci the buffer to be bound. 5802f4aeb0Sopenharmony_ci </para> 5902f4aeb0Sopenharmony_ci </listitem> 6002f4aeb0Sopenharmony_ci </varlistentry> 6102f4aeb0Sopenharmony_ci <varlistentry> 6202f4aeb0Sopenharmony_ci <term><parameter>config</parameter></term> 6302f4aeb0Sopenharmony_ci <listitem><para> 6402f4aeb0Sopenharmony_ci Specifies the EGL frame buffer configuration that defines the 6502f4aeb0Sopenharmony_ci frame buffer resource available to the surface. 6602f4aeb0Sopenharmony_ci </para></listitem> 6702f4aeb0Sopenharmony_ci </varlistentry> 6802f4aeb0Sopenharmony_ci <varlistentry> 6902f4aeb0Sopenharmony_ci <term><parameter>attrib_list</parameter></term> 7002f4aeb0Sopenharmony_ci <listitem><para> 7102f4aeb0Sopenharmony_ci Specifies pixel buffer surface attributes. 7202f4aeb0Sopenharmony_ci May be <constant>NULL</constant> or empty 7302f4aeb0Sopenharmony_ci (first attribute is <constant>EGL_NONE</constant>). 7402f4aeb0Sopenharmony_ci </para></listitem> 7502f4aeb0Sopenharmony_ci </varlistentry> 7602f4aeb0Sopenharmony_ci </variablelist> 7702f4aeb0Sopenharmony_ci </refsect1> 7802f4aeb0Sopenharmony_ci <refsect1 id="description"><title>Description</title> 7902f4aeb0Sopenharmony_ci <para> 8002f4aeb0Sopenharmony_ci <function>eglCreatePbufferFromClientBuffer</function> creates an 8102f4aeb0Sopenharmony_ci off-screen pixel buffer surface and returns its handle. If 8202f4aeb0Sopenharmony_ci <function>eglCreatePbufferFromClientBuffer</function> fails to create 8302f4aeb0Sopenharmony_ci a pixel buffer surface, <constant>EGL_NO_SURFACE</constant> 8402f4aeb0Sopenharmony_ci is returned. 8502f4aeb0Sopenharmony_ci </para> 8602f4aeb0Sopenharmony_ci <para> 8702f4aeb0Sopenharmony_ci The new pixel buffer surface is similar to a pixel buffer 8802f4aeb0Sopenharmony_ci created with 8902f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePbufferSurface</refentrytitle></citerefentry>, 9002f4aeb0Sopenharmony_ci but storage for the color buffer is provided by a client API 9102f4aeb0Sopenharmony_ci buffer. Other buffer required by 9202f4aeb0Sopenharmony_ci <parameter>config</parameter>, such as depth, stencil, and 9302f4aeb0Sopenharmony_ci alpha mask, are allocated by EGL. 9402f4aeb0Sopenharmony_ci </para> 9502f4aeb0Sopenharmony_ci <para> 9602f4aeb0Sopenharmony_ci <parameter>buftype</parameter> must be 9702f4aeb0Sopenharmony_ci <constant>EGL_OPENVG_IMAGE</constant>, corresponding to an 9802f4aeb0Sopenharmony_ci OpenVG <type>VGImage</type> buffer. 9902f4aeb0Sopenharmony_ci <parameter>buffer</parameter> must be a valid 10002f4aeb0Sopenharmony_ci <type>VGImage</type> handle in the current OpenVG context, 10102f4aeb0Sopenharmony_ci cast into the type <type>EGLClientBuffer</type>. 10202f4aeb0Sopenharmony_ci </para> 10302f4aeb0Sopenharmony_ci <para> 10402f4aeb0Sopenharmony_ci The height, width,, OpenVG alpha format, and OpenVG 10502f4aeb0Sopenharmony_ci colorspace (surface attributes 10602f4aeb0Sopenharmony_ci <constant>EGL_HEIGHT</constant>, 10702f4aeb0Sopenharmony_ci <constant>EGL_WIDTH</constant>, 10802f4aeb0Sopenharmony_ci <constant>EGL_VG_ALPHA_FORMAT</constant>, and 10902f4aeb0Sopenharmony_ci <constant>EGL_VG_COLORSPACE</constant>, respectively) of the 11002f4aeb0Sopenharmony_ci resulting surface are determined by the size and format of 11102f4aeb0Sopenharmony_ci <parameter>buffer</parameter>. 11202f4aeb0Sopenharmony_ci </para> 11302f4aeb0Sopenharmony_ci <para> 11402f4aeb0Sopenharmony_ci Surface attributes are specified as a list of 11502f4aeb0Sopenharmony_ci attribute-value pairs, terminated with 11602f4aeb0Sopenharmony_ci <constant>EGL_NONE</constant>. Accepted attributes are: 11702f4aeb0Sopenharmony_ci </para> 11802f4aeb0Sopenharmony_ci <variablelist> 11902f4aeb0Sopenharmony_ci <varlistentry> 12002f4aeb0Sopenharmony_ci <term><constant>EGL_MIPMAP_TEXTURE</constant></term> 12102f4aeb0Sopenharmony_ci <listitem> 12202f4aeb0Sopenharmony_ci <para> 12302f4aeb0Sopenharmony_ci Specifies whether storage for mipmaps should be 12402f4aeb0Sopenharmony_ci allocated. Space for mipmaps will be set aside if 12502f4aeb0Sopenharmony_ci the attribute value is <constant>EGL_TRUE</constant> 12602f4aeb0Sopenharmony_ci and <constant>EGL_TEXTURE_FORMAT</constant> is not 12702f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>. The default 12802f4aeb0Sopenharmony_ci value is <constant>EGL_FALSE</constant>. 12902f4aeb0Sopenharmony_ci </para> 13002f4aeb0Sopenharmony_ci </listitem> 13102f4aeb0Sopenharmony_ci </varlistentry> 13202f4aeb0Sopenharmony_ci <varlistentry> 13302f4aeb0Sopenharmony_ci <term><constant>EGL_TEXTURE_FORMAT</constant></term> 13402f4aeb0Sopenharmony_ci <listitem> 13502f4aeb0Sopenharmony_ci <para> 13602f4aeb0Sopenharmony_ci Specifies the format of the texture that will be 13702f4aeb0Sopenharmony_ci created when a pbuffer is bound to a texture map. 13802f4aeb0Sopenharmony_ci Possible values are 13902f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, 14002f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGB</constant>, and 14102f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGBA</constant>. The default 14202f4aeb0Sopenharmony_ci value is <constant>EGL_NO_TEXTURE</constant>. 14302f4aeb0Sopenharmony_ci </para> 14402f4aeb0Sopenharmony_ci </listitem> 14502f4aeb0Sopenharmony_ci </varlistentry> 14602f4aeb0Sopenharmony_ci <varlistentry> 14702f4aeb0Sopenharmony_ci <term><constant>EGL_TEXTURE_TARGET</constant></term> 14802f4aeb0Sopenharmony_ci <listitem> 14902f4aeb0Sopenharmony_ci <para> 15002f4aeb0Sopenharmony_ci Specifies the target for the texture that will be 15102f4aeb0Sopenharmony_ci created when the pbuffer is created with a texture 15202f4aeb0Sopenharmony_ci format of <constant>EGL_TEXTURE_RGB</constant> or 15302f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGBA</constant>. Possible 15402f4aeb0Sopenharmony_ci values are <constant>EGL_NO_TEXTURE</constant>, or 15502f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_2D</constant>. The default 15602f4aeb0Sopenharmony_ci value is <constant>EGL_NO_TEXTURE</constant>. 15702f4aeb0Sopenharmony_ci </para> 15802f4aeb0Sopenharmony_ci </listitem> 15902f4aeb0Sopenharmony_ci </varlistentry> 16002f4aeb0Sopenharmony_ci </variablelist> 16102f4aeb0Sopenharmony_ci <para> 16202f4aeb0Sopenharmony_ci Any EGL rendering context that was created with respect to 16302f4aeb0Sopenharmony_ci <parameter>config</parameter> can be used to render into the 16402f4aeb0Sopenharmony_ci surface. Use 16502f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglMakeCurrent</refentrytitle></citerefentry> 16602f4aeb0Sopenharmony_ci to attach an EGL rendering context to the surface. 16702f4aeb0Sopenharmony_ci </para> 16802f4aeb0Sopenharmony_ci <para> 16902f4aeb0Sopenharmony_ci Use 17002f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglQuerySurface</refentrytitle></citerefentry> 17102f4aeb0Sopenharmony_ci to retrieve the dimensions of the allocated pixel buffer 17202f4aeb0Sopenharmony_ci surface or the ID of <parameter>config</parameter>. 17302f4aeb0Sopenharmony_ci </para> 17402f4aeb0Sopenharmony_ci <para> 17502f4aeb0Sopenharmony_ci Use <citerefentry><refentrytitle>eglDestroySurface</refentrytitle></citerefentry> 17602f4aeb0Sopenharmony_ci to destroy the surface. 17702f4aeb0Sopenharmony_ci </para> 17802f4aeb0Sopenharmony_ci </refsect1> 17902f4aeb0Sopenharmony_ci <refsect1 id="notes"><title>Notes</title> 18002f4aeb0Sopenharmony_ci <para> 18102f4aeb0Sopenharmony_ci <function>eglCreatePbufferFromClientBuffer</function> is 18202f4aeb0Sopenharmony_ci supported only if the EGL version is 1.2 or greater, and if 18302f4aeb0Sopenharmony_ci the EGL implementation supports the OpenVG client API. 18402f4aeb0Sopenharmony_ci </para> 18502f4aeb0Sopenharmony_ci <para> 18602f4aeb0Sopenharmony_ci Currently 18702f4aeb0Sopenharmony_ci <function>eglCreatePbufferFromClientBuffer</function> only 18802f4aeb0Sopenharmony_ci supports binding OpenVG <type>VGImage</type> buffers to 18902f4aeb0Sopenharmony_ci pixel buffers. While other client API resources could be 19002f4aeb0Sopenharmony_ci supported in the future, mechanisms such as OpenGL ES 19102f4aeb0Sopenharmony_ci framebuffer objects, and the family of EGL and client API 19202f4aeb0Sopenharmony_ci extensions for defining and using <type>EGLImageKHR</type> 19302f4aeb0Sopenharmony_ci images, are a more flexible and general framework to satisfy 19402f4aeb0Sopenharmony_ci most of the same needs. 19502f4aeb0Sopenharmony_ci </para> 19602f4aeb0Sopenharmony_ci <para> 19702f4aeb0Sopenharmony_ci If the value of <parameter>config</parameter> attribute 19802f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_FORMAT</constant> is not 19902f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, then the pbuffer width 20002f4aeb0Sopenharmony_ci and height specify the size of the level zero texture image 20102f4aeb0Sopenharmony_ci </para> 20202f4aeb0Sopenharmony_ci <para> 20302f4aeb0Sopenharmony_ci If <constant>EGL_LARGEST_PBUFFER</constant> is specified and 20402f4aeb0Sopenharmony_ci if the pbuffer will be used as a texture (i.e. the value of 20502f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant> is 20602f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_2D</constant>, and the value of 20702f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE FORMAT</constant> is 20802f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGB</constant> or 20902f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGBA</constant>), then the aspect 21002f4aeb0Sopenharmony_ci ratio will be preserved and the new width and height will be 21102f4aeb0Sopenharmony_ci valid sizes for the texture target (e.g. if the underlying 21202f4aeb0Sopenharmony_ci OpenGL ES implementation does not support non-power-of-two 21302f4aeb0Sopenharmony_ci textures, both the width and height will be a power of 2). 21402f4aeb0Sopenharmony_ci </para> 21502f4aeb0Sopenharmony_ci <para> 21602f4aeb0Sopenharmony_ci The contents of the depth and stencil buffers may not be 21702f4aeb0Sopenharmony_ci preserved when rendering a texture to the pbuffer and 21802f4aeb0Sopenharmony_ci switching which image of the texture is rendered to (e.g., 21902f4aeb0Sopenharmony_ci switching from rendering one mipmap level to rendering 22002f4aeb0Sopenharmony_ci another). 22102f4aeb0Sopenharmony_ci </para> 22202f4aeb0Sopenharmony_ci <para> 22302f4aeb0Sopenharmony_ci Binding client API buffers to EGL pbuffers create the 22402f4aeb0Sopenharmony_ci possibility of race conditions, and of buffers being deleted 22502f4aeb0Sopenharmony_ci through one API while still in use in another API. To avoid 22602f4aeb0Sopenharmony_ci these problems, a number of constraints apply to bound 22702f4aeb0Sopenharmony_ci client API buffers: 22802f4aeb0Sopenharmony_ci <orderedlist> 22902f4aeb0Sopenharmony_ci <listitem> 23002f4aeb0Sopenharmony_ci <para> 23102f4aeb0Sopenharmony_ci Bound buffers may be used exclusively by either EGL, 23202f4aeb0Sopenharmony_ci or the client API that originally created them. For 23302f4aeb0Sopenharmony_ci example, if a <type>VGImage</type> is bound to a 23402f4aeb0Sopenharmony_ci pbuffer, and that pbuffer is bound to any client API 23502f4aeb0Sopenharmony_ci rendering context, then the <type>VGImage</type> may 23602f4aeb0Sopenharmony_ci not be used as the explicit source or destination of 23702f4aeb0Sopenharmony_ci any OpenVG operation. Errors resulting from such use 23802f4aeb0Sopenharmony_ci are described in client API specifications. 23902f4aeb0Sopenharmony_ci Similarly, while a <type>VGImage</type> is in use by 24002f4aeb0Sopenharmony_ci OpenVG, the pbuffer it is bound to may not be made 24102f4aeb0Sopenharmony_ci current to any client API context using 24202f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglMakeCurrent</refentrytitle></citerefentry>. 24302f4aeb0Sopenharmony_ci </para> 24402f4aeb0Sopenharmony_ci </listitem> 24502f4aeb0Sopenharmony_ci <listitem> 24602f4aeb0Sopenharmony_ci <para> 24702f4aeb0Sopenharmony_ci Binding a buffer creates an additional reference to 24802f4aeb0Sopenharmony_ci it, and implementations must respect outstanding 24902f4aeb0Sopenharmony_ci references when destroying objects. For example, if 25002f4aeb0Sopenharmony_ci a <type>VGImage</type> is bound to a pbuffer, 25102f4aeb0Sopenharmony_ci destroying the image with 25202f4aeb0Sopenharmony_ci <function>vgDestroyImage</function> will not free 25302f4aeb0Sopenharmony_ci the underlying buffer, because it is still in use by 25402f4aeb0Sopenharmony_ci EGL. However, following 25502f4aeb0Sopenharmony_ci <function>vgDestroyImage</function> the buffer may 25602f4aeb0Sopenharmony_ci only be referred to via the EGL pbuffer handle, 25702f4aeb0Sopenharmony_ci since the OpenVG handle to that buffer no longer 25802f4aeb0Sopenharmony_ci exists. Similarly, destroying the pbuffer with 25902f4aeb0Sopenharmony_ci <function>eglDestroySurface</function> will not free 26002f4aeb0Sopenharmony_ci the underlying buffer, because it is still in use by 26102f4aeb0Sopenharmony_ci OpenVG . However, following 26202f4aeb0Sopenharmony_ci <function>eglDestroySurface</function> the buffer 26302f4aeb0Sopenharmony_ci may only be referred to via the OpenVG 26402f4aeb0Sopenharmony_ci <type>VGImage</type> handle, since the EGL pbuffer 26502f4aeb0Sopenharmony_ci handle no longer exists. 26602f4aeb0Sopenharmony_ci </para> 26702f4aeb0Sopenharmony_ci </listitem> 26802f4aeb0Sopenharmony_ci </orderedlist> 26902f4aeb0Sopenharmony_ci </para> 27002f4aeb0Sopenharmony_ci </refsect1> 27102f4aeb0Sopenharmony_ci <refsect1 id="errors"><title>Errors</title> 27202f4aeb0Sopenharmony_ci <para> 27302f4aeb0Sopenharmony_ci <constant>EGL_NO_SURFACE</constant> is returned if creation of 27402f4aeb0Sopenharmony_ci the context fails. 27502f4aeb0Sopenharmony_ci </para> 27602f4aeb0Sopenharmony_ci <para> 27702f4aeb0Sopenharmony_ci <constant>EGL_BAD_DISPLAY</constant> is generated if 27802f4aeb0Sopenharmony_ci <parameter>display</parameter> is not an EGL display connection. 27902f4aeb0Sopenharmony_ci </para> 28002f4aeb0Sopenharmony_ci <para> 28102f4aeb0Sopenharmony_ci <constant>EGL_NOT_INITIALIZED</constant> is generated if 28202f4aeb0Sopenharmony_ci <parameter>display</parameter> has not been initialized. 28302f4aeb0Sopenharmony_ci </para> 28402f4aeb0Sopenharmony_ci <para> 28502f4aeb0Sopenharmony_ci <constant>EGL_BAD_CONFIG</constant> is generated if 28602f4aeb0Sopenharmony_ci <parameter>config</parameter> is not an EGL frame buffer configuration. 28702f4aeb0Sopenharmony_ci </para> 28802f4aeb0Sopenharmony_ci <para> 28902f4aeb0Sopenharmony_ci <constant>EGL_BAD_PARAMETER</constant> is generated if 29002f4aeb0Sopenharmony_ci <parameter>buftype</parameter> is not 29102f4aeb0Sopenharmony_ci <constant>EGL_OPENVG_IMAGE</constant>, or if 29202f4aeb0Sopenharmony_ci <parameter>buffer</parameter> is not a valid handle to a 29302f4aeb0Sopenharmony_ci <type>VGImage</type> object in the currently bound OpenVG 29402f4aeb0Sopenharmony_ci context. 29502f4aeb0Sopenharmony_ci </para> 29602f4aeb0Sopenharmony_ci <para> 29702f4aeb0Sopenharmony_ci <constant>EGL_BAD_ACCESS</constant> is generated if there is 29802f4aeb0Sopenharmony_ci no current OpenVG context, or if 29902f4aeb0Sopenharmony_ci <parameter>buffer</parameter> is already bound to another 30002f4aeb0Sopenharmony_ci pixel buffer or in use by OpenVG as discussed in the Notes 30102f4aeb0Sopenharmony_ci section above. 30202f4aeb0Sopenharmony_ci </para> 30302f4aeb0Sopenharmony_ci <para> 30402f4aeb0Sopenharmony_ci <constant>EGL_BAD_ALLOC</constant> is generated if there are not 30502f4aeb0Sopenharmony_ci enough resources to allocate the new surface. 30602f4aeb0Sopenharmony_ci </para> 30702f4aeb0Sopenharmony_ci <para> 30802f4aeb0Sopenharmony_ci <constant>EGL_BAD_ATTRIBUTE</constant> is generated if 30902f4aeb0Sopenharmony_ci <parameter>attrib_list</parameter> contains an invalid pixel 31002f4aeb0Sopenharmony_ci buffer attribute or if an attribute value is not recognized 31102f4aeb0Sopenharmony_ci or out of range. 31202f4aeb0Sopenharmony_ci </para> 31302f4aeb0Sopenharmony_ci <para> 31402f4aeb0Sopenharmony_ci <constant>EGL_BAD_ATTRIBUTE</constant> is generated if 31502f4aeb0Sopenharmony_ci <parameter>attrib_list</parameter> contains any of the 31602f4aeb0Sopenharmony_ci attributes <constant>EGL_MIPMAP_TEXTURE</constant>, 31702f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_FORMAT</constant>, or 31802f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant>, and 31902f4aeb0Sopenharmony_ci <parameter>config</parameter> does not support OpenGL ES 32002f4aeb0Sopenharmony_ci rendering (e.g. the EGL version is 1.2 or later, and the 32102f4aeb0Sopenharmony_ci <constant>EGL_RENDERABLE_TYPE</constant> attribute of 32202f4aeb0Sopenharmony_ci <parameter>config</parameter> does not include at least one 32302f4aeb0Sopenharmony_ci of <constant>EGL_OPENGL_ES_BIT</constant> or 32402f4aeb0Sopenharmony_ci <constant>EGL_OPENGL_ES2_BIT</constant>). 32502f4aeb0Sopenharmony_ci </para> 32602f4aeb0Sopenharmony_ci <para> 32702f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if 32802f4aeb0Sopenharmony_ci <parameter>config</parameter> does not support rendering to pixel buffers 32902f4aeb0Sopenharmony_ci (the <constant>EGL_SURFACE_TYPE</constant> attribute does not contain 33002f4aeb0Sopenharmony_ci <constant>EGL_PBUFFER_BIT</constant>). 33102f4aeb0Sopenharmony_ci </para> 33202f4aeb0Sopenharmony_ci <para> 33302f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if the 33402f4aeb0Sopenharmony_ci buffers contained in <parameter>buffer</parameter> do not 33502f4aeb0Sopenharmony_ci match the bit depths for those buffers specified by 33602f4aeb0Sopenharmony_ci <parameter>config</parameter>. 33702f4aeb0Sopenharmony_ci </para> 33802f4aeb0Sopenharmony_ci <para> 33902f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if the 34002f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_FORMAT</constant> attribute is not 34102f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, and 34202f4aeb0Sopenharmony_ci <constant>EGL_WIDTH</constant> and/or 34302f4aeb0Sopenharmony_ci <constant>EGL_HEIGHT</constant> specify an invalid size 34402f4aeb0Sopenharmony_ci (e.g., the texture size is not a power of 2, and the 34502f4aeb0Sopenharmony_ci underlying OpenGL ES implementation does not support 34602f4aeb0Sopenharmony_ci non-power-of-two textures). 34702f4aeb0Sopenharmony_ci </para> 34802f4aeb0Sopenharmony_ci <para> 34902f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if 35002f4aeb0Sopenharmony_ci the <constant>EGL_TEXTURE_FORMAT</constant> attribute is 35102f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, and 35202f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant> is something other 35302f4aeb0Sopenharmony_ci than <constant>EGL_NO_TEXTURE</constant>; or, 35402f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_FORMAT</constant> is something other 35502f4aeb0Sopenharmony_ci than <constant>EGL_NO_TEXTURE</constant>, and 35602f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant> is 35702f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>. 35802f4aeb0Sopenharmony_ci </para> 35902f4aeb0Sopenharmony_ci <para> 36002f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if the 36102f4aeb0Sopenharmony_ci implementation has additional constraints on which types of 36202f4aeb0Sopenharmony_ci client API buffers may be bound to pixel buffer surfaces. 36302f4aeb0Sopenharmony_ci For example, it is possible that the OpenVG implementation 36402f4aeb0Sopenharmony_ci might not support a <type>VGImage</type> being bound to a 36502f4aeb0Sopenharmony_ci pixel buffer which will be used as a mipmapped OpenGL ES 36602f4aeb0Sopenharmony_ci texture (e.g. whose <constant>EGL_MIPMAP_TEXTURE</constant> 36702f4aeb0Sopenharmony_ci attribute is <constant>TRUE</constant>). Any such 36802f4aeb0Sopenharmony_ci constraints should be documented by the implementation 36902f4aeb0Sopenharmony_ci release notes. 37002f4aeb0Sopenharmony_ci </para> 37102f4aeb0Sopenharmony_ci </refsect1> 37202f4aeb0Sopenharmony_ci <refsect1 id="seealso"><title>See Also</title> 37302f4aeb0Sopenharmony_ci <para> 37402f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglDestroySurface</refentrytitle></citerefentry>, 37502f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglChooseConfig</refentrytitle></citerefentry>, 37602f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePbufferSurface</refentrytitle></citerefentry>, 37702f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglGetConfigs</refentrytitle></citerefentry>, 37802f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglMakeCurrent</refentrytitle></citerefentry>, 37902f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglQuerySurface</refentrytitle></citerefentry> 38002f4aeb0Sopenharmony_ci </para> 38102f4aeb0Sopenharmony_ci </refsect1> 38202f4aeb0Sopenharmony_ci <refsect3 id="Copyright"><title></title> 38302f4aeb0Sopenharmony_ci <!-- Content included from copyright.inc.xsl --> 38402f4aeb0Sopenharmony_ci <imageobject> 38502f4aeb0Sopenharmony_ci <imagedata fileref="KhronosLogo.jpg" format="jpg" /> 38602f4aeb0Sopenharmony_ci </imageobject> 38702f4aeb0Sopenharmony_ci <para /> 38802f4aeb0Sopenharmony_ci </refsect3> 38902f4aeb0Sopenharmony_ci</refentry> 390