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="eglSurfaceAttrib"> 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>eglSurfaceAttrib</refentrytitle> 1302f4aeb0Sopenharmony_ci <manvolnum>3G</manvolnum> 1402f4aeb0Sopenharmony_ci </refmeta> 1502f4aeb0Sopenharmony_ci <refnamediv> 1602f4aeb0Sopenharmony_ci <refname>eglSurfaceAttrib</refname> 1702f4aeb0Sopenharmony_ci <refpurpose> 1802f4aeb0Sopenharmony_ci set an <acronym>EGL</acronym> surface attribute 1902f4aeb0Sopenharmony_ci </refpurpose> 2002f4aeb0Sopenharmony_ci </refnamediv> 2102f4aeb0Sopenharmony_ci <refsynopsisdiv> 2202f4aeb0Sopenharmony_ci <title>C Specification</title> 2302f4aeb0Sopenharmony_ci <funcsynopsis> 2402f4aeb0Sopenharmony_ci <funcprototype> 2502f4aeb0Sopenharmony_ci <funcdef>EGLBoolean <function>eglSurfaceAttrib</function></funcdef> 2602f4aeb0Sopenharmony_ci <paramdef>EGLDisplay <parameter>display</parameter></paramdef> 2702f4aeb0Sopenharmony_ci <paramdef>EGLSurface <parameter>surface</parameter></paramdef> 2802f4aeb0Sopenharmony_ci <paramdef>EGLint <parameter>attribute</parameter></paramdef> 2902f4aeb0Sopenharmony_ci <paramdef>EGLint <parameter>value</parameter></paramdef> 3002f4aeb0Sopenharmony_ci </funcprototype> 3102f4aeb0Sopenharmony_ci </funcsynopsis> 3202f4aeb0Sopenharmony_ci </refsynopsisdiv> 3302f4aeb0Sopenharmony_ci <refsect1 id="parameters"><title>Parameters</title> 3402f4aeb0Sopenharmony_ci <variablelist> 3502f4aeb0Sopenharmony_ci <varlistentry> 3602f4aeb0Sopenharmony_ci <term><parameter>display</parameter></term> 3702f4aeb0Sopenharmony_ci <listitem> 3802f4aeb0Sopenharmony_ci <para> 3902f4aeb0Sopenharmony_ci Specifies the EGL display connection. 4002f4aeb0Sopenharmony_ci </para> 4102f4aeb0Sopenharmony_ci </listitem> 4202f4aeb0Sopenharmony_ci </varlistentry> 4302f4aeb0Sopenharmony_ci <varlistentry> 4402f4aeb0Sopenharmony_ci <term><parameter>surface</parameter></term> 4502f4aeb0Sopenharmony_ci <listitem> 4602f4aeb0Sopenharmony_ci <para> 4702f4aeb0Sopenharmony_ci Specifies the EGL surface. 4802f4aeb0Sopenharmony_ci </para> 4902f4aeb0Sopenharmony_ci </listitem> 5002f4aeb0Sopenharmony_ci </varlistentry> 5102f4aeb0Sopenharmony_ci <varlistentry> 5202f4aeb0Sopenharmony_ci <term><parameter>attribute</parameter></term> 5302f4aeb0Sopenharmony_ci <listitem> 5402f4aeb0Sopenharmony_ci <para> 5502f4aeb0Sopenharmony_ci Specifies the EGL surface attribute to set. 5602f4aeb0Sopenharmony_ci </para> 5702f4aeb0Sopenharmony_ci </listitem> 5802f4aeb0Sopenharmony_ci </varlistentry> 5902f4aeb0Sopenharmony_ci <varlistentry> 6002f4aeb0Sopenharmony_ci <term><parameter>value</parameter></term> 6102f4aeb0Sopenharmony_ci <listitem> 6202f4aeb0Sopenharmony_ci <para> 6302f4aeb0Sopenharmony_ci Specifies the attributes required value. 6402f4aeb0Sopenharmony_ci </para> 6502f4aeb0Sopenharmony_ci </listitem> 6602f4aeb0Sopenharmony_ci </varlistentry> 6702f4aeb0Sopenharmony_ci </variablelist> 6802f4aeb0Sopenharmony_ci </refsect1> 6902f4aeb0Sopenharmony_ci <refsect1 id="description"><title>Description</title> 7002f4aeb0Sopenharmony_ci <para> 7102f4aeb0Sopenharmony_ci <function>eglSurfaceAttrib</function> sets the value of 7202f4aeb0Sopenharmony_ci <parameter>attribute</parameter> for 7302f4aeb0Sopenharmony_ci <parameter>surface</parameter> to 7402f4aeb0Sopenharmony_ci <parameter>value</parameter>. 7502f4aeb0Sopenharmony_ci <parameter>attribute</parameter> can be one of the 7602f4aeb0Sopenharmony_ci following: 7702f4aeb0Sopenharmony_ci </para> 7802f4aeb0Sopenharmony_ci <variablelist> 7902f4aeb0Sopenharmony_ci <varlistentry> 8002f4aeb0Sopenharmony_ci <term><constant>EGL_MIPMAP_LEVEL</constant></term> 8102f4aeb0Sopenharmony_ci <listitem><para> 8202f4aeb0Sopenharmony_ci For mipmap textures, the 8302f4aeb0Sopenharmony_ci <constant>EGL_MIPMAP_LEVEL</constant> attribute 8402f4aeb0Sopenharmony_ci indicates which level of the mipmap should be 8502f4aeb0Sopenharmony_ci rendered. If the value of this attribute is outside 8602f4aeb0Sopenharmony_ci the range of supported mipmap levels, the closest 8702f4aeb0Sopenharmony_ci valid mipmap level is selected for rendering. The 8802f4aeb0Sopenharmony_ci default value is <constant>0</constant>. 8902f4aeb0Sopenharmony_ci </para></listitem> 9002f4aeb0Sopenharmony_ci </varlistentry> 9102f4aeb0Sopenharmony_ci <varlistentry> 9202f4aeb0Sopenharmony_ci <term><constant>EGL_MULTISAMPLE_RESOLVE</constant></term> 9302f4aeb0Sopenharmony_ci <listitem> 9402f4aeb0Sopenharmony_ci <para> 9502f4aeb0Sopenharmony_ci Specifies the filter to use when resolving the 9602f4aeb0Sopenharmony_ci multisample buffer (this may occur when swapping or 9702f4aeb0Sopenharmony_ci copying the surface, or when changing the client API 9802f4aeb0Sopenharmony_ci context bound to the surface). A 9902f4aeb0Sopenharmony_ci <parameter>value</parameter> of 10002f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_DEFAULT</constant> 10102f4aeb0Sopenharmony_ci chooses the default implementation-defined filtering 10202f4aeb0Sopenharmony_ci method, while 10302f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_BOX</constant> 10402f4aeb0Sopenharmony_ci chooses a one-pixel wide box filter placing equal 10502f4aeb0Sopenharmony_ci weighting on all multisample values. 10602f4aeb0Sopenharmony_ci </para> 10702f4aeb0Sopenharmony_ci <para> 10802f4aeb0Sopenharmony_ci The initial value of 10902f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE</constant> is 11002f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_DEFAULT</constant>. 11102f4aeb0Sopenharmony_ci </para> 11202f4aeb0Sopenharmony_ci </listitem> 11302f4aeb0Sopenharmony_ci </varlistentry> 11402f4aeb0Sopenharmony_ci <varlistentry> 11502f4aeb0Sopenharmony_ci <term><constant>EGL_SWAP_BEHAVIOR</constant></term> 11602f4aeb0Sopenharmony_ci <listitem> 11702f4aeb0Sopenharmony_ci <para> 11802f4aeb0Sopenharmony_ci Specifies the effect on the color buffer of posting 11902f4aeb0Sopenharmony_ci a surface with 12002f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry>. 12102f4aeb0Sopenharmony_ci A <parameter>value</parameter> of 12202f4aeb0Sopenharmony_ci <constant>EGL_BUFFER_PRESERVED</constant> indicates 12302f4aeb0Sopenharmony_ci that color buffer contents are unaffected, while 12402f4aeb0Sopenharmony_ci <constant>EGL_BUFFER_DESTROYED</constant> indicates 12502f4aeb0Sopenharmony_ci that color buffer contents may be destroyed or 12602f4aeb0Sopenharmony_ci changed by the operation. 12702f4aeb0Sopenharmony_ci </para> 12802f4aeb0Sopenharmony_ci <para> 12902f4aeb0Sopenharmony_ci The initial value of 13002f4aeb0Sopenharmony_ci <constant>EGL_SWAP_BEHAVIOR</constant> is chosen by 13102f4aeb0Sopenharmony_ci the implementation. 13202f4aeb0Sopenharmony_ci </para> 13302f4aeb0Sopenharmony_ci </listitem> 13402f4aeb0Sopenharmony_ci </varlistentry> 13502f4aeb0Sopenharmony_ci </variablelist> 13602f4aeb0Sopenharmony_ci </refsect1> 13702f4aeb0Sopenharmony_ci <refsect1 id="notes"><title>Notes</title> 13802f4aeb0Sopenharmony_ci <para> 13902f4aeb0Sopenharmony_ci Attribute <constant>EGL_MULTISAMPLE_RESOLVE</constant> is 14002f4aeb0Sopenharmony_ci supported only if the EGL version is 1.4 or greater. 14102f4aeb0Sopenharmony_ci </para> 14202f4aeb0Sopenharmony_ci <para> 14302f4aeb0Sopenharmony_ci Attribute <constant>EGL_SWAP_BEHAVIOR</constant> is 14402f4aeb0Sopenharmony_ci supported only if the EGL version is 1.2 or greater. 14502f4aeb0Sopenharmony_ci </para> 14602f4aeb0Sopenharmony_ci <para> 14702f4aeb0Sopenharmony_ci If the value of pbuffer attribute 14802f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_FORMAT</constant> is 14902f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, the value of attribute 15002f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant> is 15102f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, or 15202f4aeb0Sopenharmony_ci <parameter>surface</parameter> is not a pbuffer, then 15302f4aeb0Sopenharmony_ci attribute <constant>EGL_MIPMAP_LEVEL</constant> may be set, 15402f4aeb0Sopenharmony_ci but has no effect. 15502f4aeb0Sopenharmony_ci </para> 15602f4aeb0Sopenharmony_ci </refsect1> 15702f4aeb0Sopenharmony_ci <refsect1 id="errors"><title>Errors</title> 15802f4aeb0Sopenharmony_ci <para> 15902f4aeb0Sopenharmony_ci <constant>EGL_FALSE</constant> is returned on failure, 16002f4aeb0Sopenharmony_ci <constant>EGL_TRUE</constant> otherwise. 16102f4aeb0Sopenharmony_ci </para> 16202f4aeb0Sopenharmony_ci <para> 16302f4aeb0Sopenharmony_ci <constant>EGL_BAD_DISPLAY</constant> is generated if 16402f4aeb0Sopenharmony_ci <parameter>display</parameter> is not an EGL display connection. 16502f4aeb0Sopenharmony_ci </para> 16602f4aeb0Sopenharmony_ci <para> 16702f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if 16802f4aeb0Sopenharmony_ci <parameter>attribute</parameter> is 16902f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE</constant>, 17002f4aeb0Sopenharmony_ci <parameter>value</parameter> is 17102f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_BOX</constant>, and the 17202f4aeb0Sopenharmony_ci <constant>EGL_SURFACE_TYPE</constant> attribute of the 17302f4aeb0Sopenharmony_ci <type>EGLConfig</type> used to create 17402f4aeb0Sopenharmony_ci <parameter>surface</parameter> does not contain 17502f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_BOX_BIT</constant>. 17602f4aeb0Sopenharmony_ci </para> 17702f4aeb0Sopenharmony_ci <para> 17802f4aeb0Sopenharmony_ci <constant>EGL_BAD_MATCH</constant> is generated if 17902f4aeb0Sopenharmony_ci <parameter>attribute</parameter> is 18002f4aeb0Sopenharmony_ci <constant>EGL_SWAP_BEHAVIOR</constant>, 18102f4aeb0Sopenharmony_ci <parameter>value</parameter> is 18202f4aeb0Sopenharmony_ci <constant>EGL_BUFFER_PRESERVED</constant>, and the 18302f4aeb0Sopenharmony_ci <constant>EGL_SURFACE_TYPE</constant> attribute of the 18402f4aeb0Sopenharmony_ci <type>EGLConfig</type> used to create 18502f4aeb0Sopenharmony_ci <parameter>surface</parameter> does not contain 18602f4aeb0Sopenharmony_ci <constant>EGL_SWAP_BEHAVIOR_PRESERVED_BIT</constant>. 18702f4aeb0Sopenharmony_ci </para> 18802f4aeb0Sopenharmony_ci <para> 18902f4aeb0Sopenharmony_ci <constant>EGL_NOT_INITIALIZED</constant> is generated if 19002f4aeb0Sopenharmony_ci <parameter>display</parameter> has not been initialized. 19102f4aeb0Sopenharmony_ci </para> 19202f4aeb0Sopenharmony_ci <para> 19302f4aeb0Sopenharmony_ci <constant>EGL_BAD_SURFACE</constant> is generated if 19402f4aeb0Sopenharmony_ci <parameter>surface</parameter> is not an EGL surface. 19502f4aeb0Sopenharmony_ci </para> 19602f4aeb0Sopenharmony_ci <para> 19702f4aeb0Sopenharmony_ci <constant>EGL_BAD_ATTRIBUTE</constant> is generated if 19802f4aeb0Sopenharmony_ci <parameter>attribute</parameter> is not a valid surface attribute. 19902f4aeb0Sopenharmony_ci </para> 20002f4aeb0Sopenharmony_ci </refsect1> 20102f4aeb0Sopenharmony_ci <refsect1 id="seealso"><title>See Also</title> 20202f4aeb0Sopenharmony_ci <para> 20302f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePbufferSurface</refentrytitle></citerefentry>, 20402f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePixmapSurface</refentrytitle></citerefentry>, 20502f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreateWindowSurface</refentrytitle></citerefentry>, 20602f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglQuerySurface</refentrytitle></citerefentry> 20702f4aeb0Sopenharmony_ci </para> 20802f4aeb0Sopenharmony_ci </refsect1> 20902f4aeb0Sopenharmony_ci <refsect3 id="Copyright"><title></title> 21002f4aeb0Sopenharmony_ci <!-- Content included from copyright.inc.xsl --> 21102f4aeb0Sopenharmony_ci <imageobject> 21202f4aeb0Sopenharmony_ci <imagedata fileref="KhronosLogo.jpg" format="jpg" /> 21302f4aeb0Sopenharmony_ci </imageobject> 21402f4aeb0Sopenharmony_ci <para /> 21502f4aeb0Sopenharmony_ci </refsect3> 21602f4aeb0Sopenharmony_ci</refentry> 217