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="eglQuerySurface"> 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>eglQuerySurface</refentrytitle> 1302f4aeb0Sopenharmony_ci <manvolnum>3G</manvolnum> 1402f4aeb0Sopenharmony_ci </refmeta> 1502f4aeb0Sopenharmony_ci <refnamediv> 1602f4aeb0Sopenharmony_ci <refname>eglQuerySurface</refname> 1702f4aeb0Sopenharmony_ci <refpurpose> 1802f4aeb0Sopenharmony_ci return <acronym>EGL</acronym> surface information 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>eglQuerySurface</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 to query. 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 be returned. 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 Returns the requested 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>eglQuerySurface</function> returns in 7202f4aeb0Sopenharmony_ci <parameter>value</parameter> the value of 7302f4aeb0Sopenharmony_ci <parameter>attribute</parameter> for <parameter>surface</parameter>. 7402f4aeb0Sopenharmony_ci <parameter>attribute</parameter> can be one of the following: 7502f4aeb0Sopenharmony_ci </para> 7602f4aeb0Sopenharmony_ci <variablelist> 7702f4aeb0Sopenharmony_ci <varlistentry> 7802f4aeb0Sopenharmony_ci <term><constant>EGL_CONFIG_ID</constant></term> 7902f4aeb0Sopenharmony_ci <listitem><para> 8002f4aeb0Sopenharmony_ci Returns the ID of the EGL frame buffer configuration 8102f4aeb0Sopenharmony_ci with respect to which the surface was created. 8202f4aeb0Sopenharmony_ci </para></listitem> 8302f4aeb0Sopenharmony_ci </varlistentry> 8402f4aeb0Sopenharmony_ci <varlistentry> 8502f4aeb0Sopenharmony_ci <term><constant>EGL_HEIGHT</constant></term> 8602f4aeb0Sopenharmony_ci <listitem><para> 8702f4aeb0Sopenharmony_ci Returns the height of the surface in pixels. 8802f4aeb0Sopenharmony_ci </para></listitem> 8902f4aeb0Sopenharmony_ci </varlistentry> 9002f4aeb0Sopenharmony_ci <varlistentry> 9102f4aeb0Sopenharmony_ci <term><constant>EGL_HORIZONTAL_RESOLUTION</constant></term> 9202f4aeb0Sopenharmony_ci <listitem><para> 9302f4aeb0Sopenharmony_ci Returns the horizontal dot pitch of the display on 9402f4aeb0Sopenharmony_ci which a window surface is visible. The value 9502f4aeb0Sopenharmony_ci returned is equal to the actual dot pitch, in 9602f4aeb0Sopenharmony_ci pixels/meter, multiplied by the constant value 9702f4aeb0Sopenharmony_ci <constant>EGL_DISPLAY_SCALING</constant>. 9802f4aeb0Sopenharmony_ci </para></listitem> 9902f4aeb0Sopenharmony_ci </varlistentry> 10002f4aeb0Sopenharmony_ci <varlistentry> 10102f4aeb0Sopenharmony_ci <term><constant>EGL_LARGEST_PBUFFER</constant></term> 10202f4aeb0Sopenharmony_ci <listitem><para> 10302f4aeb0Sopenharmony_ci Returns the same attribute value specified when the 10402f4aeb0Sopenharmony_ci surface was created with 10502f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePbufferSurface</refentrytitle></citerefentry>. 10602f4aeb0Sopenharmony_ci For a window or pixmap surface, 10702f4aeb0Sopenharmony_ci <parameter>value</parameter> is not modified. 10802f4aeb0Sopenharmony_ci </para></listitem> 10902f4aeb0Sopenharmony_ci </varlistentry> 11002f4aeb0Sopenharmony_ci <varlistentry> 11102f4aeb0Sopenharmony_ci <term><constant>EGL_MIPMAP_LEVEL</constant></term> 11202f4aeb0Sopenharmony_ci <listitem><para> 11302f4aeb0Sopenharmony_ci Returns which level of the mipmap to render to, if 11402f4aeb0Sopenharmony_ci texture has mipmaps. 11502f4aeb0Sopenharmony_ci </para></listitem> 11602f4aeb0Sopenharmony_ci </varlistentry> 11702f4aeb0Sopenharmony_ci <varlistentry> 11802f4aeb0Sopenharmony_ci <term><constant>EGL_MIPMAP_TEXTURE</constant></term> 11902f4aeb0Sopenharmony_ci <listitem><para> 12002f4aeb0Sopenharmony_ci Returns <constant>EGL_TRUE</constant> if texture has 12102f4aeb0Sopenharmony_ci mipmaps, <constant>EGL_FALSE</constant> otherwise. 12202f4aeb0Sopenharmony_ci </para></listitem> 12302f4aeb0Sopenharmony_ci </varlistentry> 12402f4aeb0Sopenharmony_ci <varlistentry> 12502f4aeb0Sopenharmony_ci <term><constant>EGL_MULTISAMPLE_RESOLVE</constant></term> 12602f4aeb0Sopenharmony_ci <listitem> 12702f4aeb0Sopenharmony_ci <para> 12802f4aeb0Sopenharmony_ci Returns the filter used when resolving the 12902f4aeb0Sopenharmony_ci multisample buffer. The filter may be either 13002f4aeb0Sopenharmony_ci <constant>EGL_MULTISAMPLE_RESOLVE_DEFAULT</constant> 13102f4aeb0Sopenharmony_ci or <constant>EGL_MULTISAMPLE_RESOLVE_BOX</constant>, 13202f4aeb0Sopenharmony_ci as described for 13302f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSurfaceAttrib</refentrytitle></citerefentry>. 13402f4aeb0Sopenharmony_ci </para> 13502f4aeb0Sopenharmony_ci </listitem> 13602f4aeb0Sopenharmony_ci </varlistentry> 13702f4aeb0Sopenharmony_ci <varlistentry> 13802f4aeb0Sopenharmony_ci <term><constant>EGL_PIXEL_ASPECT_RATIO</constant></term> 13902f4aeb0Sopenharmony_ci <listitem><para> 14002f4aeb0Sopenharmony_ci Returns the aspect ratio of an individual pixel (the 14102f4aeb0Sopenharmony_ci ratio of a pixel's width to its height). The value 14202f4aeb0Sopenharmony_ci returned is equal to the actual aspect ratio 14302f4aeb0Sopenharmony_ci multiplied by the constant value 14402f4aeb0Sopenharmony_ci <constant>EGL_DISPLAY_SCALING</constant>. 14502f4aeb0Sopenharmony_ci </para></listitem> 14602f4aeb0Sopenharmony_ci </varlistentry> 14702f4aeb0Sopenharmony_ci <varlistentry> 14802f4aeb0Sopenharmony_ci <term><constant>EGL_RENDER_BUFFER</constant></term> 14902f4aeb0Sopenharmony_ci <listitem><para> 15002f4aeb0Sopenharmony_ci Returns the buffer which client API rendering is 15102f4aeb0Sopenharmony_ci requested to use. For a window surface, this is the 15202f4aeb0Sopenharmony_ci same attribute value specified when the surface was 15302f4aeb0Sopenharmony_ci created. For a pbuffer surface, it is always 15402f4aeb0Sopenharmony_ci <constant>EGL_BACK_BUFFER</constant>. For a pixmap 15502f4aeb0Sopenharmony_ci surface, it is always 15602f4aeb0Sopenharmony_ci <constant>EGL_SINGLE_BUFFER</constant>. To determine 15702f4aeb0Sopenharmony_ci the actual buffer being rendered to by a context, 15802f4aeb0Sopenharmony_ci call 15902f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglQueryContext</refentrytitle></citerefentry>. 16002f4aeb0Sopenharmony_ci </para></listitem> 16102f4aeb0Sopenharmony_ci </varlistentry> 16202f4aeb0Sopenharmony_ci <varlistentry> 16302f4aeb0Sopenharmony_ci <term><constant>EGL_SWAP_BEHAVIOR</constant></term> 16402f4aeb0Sopenharmony_ci <listitem><para> 16502f4aeb0Sopenharmony_ci Returns the effect on the color buffer when posting 16602f4aeb0Sopenharmony_ci a surface with 16702f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry>. 16802f4aeb0Sopenharmony_ci Swap behavior may be either 16902f4aeb0Sopenharmony_ci <constant>EGL_BUFFER_PRESERVED</constant> or 17002f4aeb0Sopenharmony_ci <constant>EGL_BUFFER_DESTROYED</constant>, as 17102f4aeb0Sopenharmony_ci described for 17202f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSurfaceAttrib</refentrytitle></citerefentry>. 17302f4aeb0Sopenharmony_ci </para></listitem> 17402f4aeb0Sopenharmony_ci </varlistentry> 17502f4aeb0Sopenharmony_ci <varlistentry> 17602f4aeb0Sopenharmony_ci <term><constant>EGL_TEXTURE_FORMAT</constant></term> 17702f4aeb0Sopenharmony_ci <listitem><para> 17802f4aeb0Sopenharmony_ci Returns format of texture. Possible values are 17902f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, 18002f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGB</constant>, and 18102f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_RGBA</constant>. 18202f4aeb0Sopenharmony_ci </para></listitem> 18302f4aeb0Sopenharmony_ci </varlistentry> 18402f4aeb0Sopenharmony_ci <varlistentry> 18502f4aeb0Sopenharmony_ci <term><constant>EGL_TEXTURE_TARGET</constant></term> 18602f4aeb0Sopenharmony_ci <listitem><para> 18702f4aeb0Sopenharmony_ci Returns type of texture. Possible values are 18802f4aeb0Sopenharmony_ci <constant>EGL_NO_TEXTURE</constant>, or 18902f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_2D</constant>. 19002f4aeb0Sopenharmony_ci </para></listitem> 19102f4aeb0Sopenharmony_ci </varlistentry> 19202f4aeb0Sopenharmony_ci <varlistentry> 19302f4aeb0Sopenharmony_ci <term><constant>EGL_VERTICAL_RESOLUTION</constant></term> 19402f4aeb0Sopenharmony_ci <listitem><para> 19502f4aeb0Sopenharmony_ci Returns the vertical dot pitch of the display on 19602f4aeb0Sopenharmony_ci which a window surface is visible. The value 19702f4aeb0Sopenharmony_ci returned is equal to the actual dot pitch, in 19802f4aeb0Sopenharmony_ci pixels/meter, multiplied by the constant value 19902f4aeb0Sopenharmony_ci <constant>EGL_DISPLAY_SCALING</constant>. 20002f4aeb0Sopenharmony_ci </para></listitem> 20102f4aeb0Sopenharmony_ci </varlistentry> 20202f4aeb0Sopenharmony_ci <varlistentry> 20302f4aeb0Sopenharmony_ci <term><constant>EGL_WIDTH</constant></term> 20402f4aeb0Sopenharmony_ci <listitem><para> 20502f4aeb0Sopenharmony_ci Returns the width of the surface in pixels. 20602f4aeb0Sopenharmony_ci </para></listitem> 20702f4aeb0Sopenharmony_ci </varlistentry> 20802f4aeb0Sopenharmony_ci </variablelist> 20902f4aeb0Sopenharmony_ci </refsect1> 21002f4aeb0Sopenharmony_ci <refsect1 id="notes"><title>Notes</title> 21102f4aeb0Sopenharmony_ci <para> 21202f4aeb0Sopenharmony_ci Attribute <constant>EGL_MULTISAMPLE_RESOLVE</constant> is 21302f4aeb0Sopenharmony_ci supported only if the EGL version is 1.4 or greater. 21402f4aeb0Sopenharmony_ci </para> 21502f4aeb0Sopenharmony_ci <para> 21602f4aeb0Sopenharmony_ci Attributes <constant>EGL_DISPLAY_SCALING</constant>. 21702f4aeb0Sopenharmony_ci <constant>EGL_HORIZONTAL_RESOLUTION</constant>, 21802f4aeb0Sopenharmony_ci <constant>EGL_PIXEL_ASPECT_RATIO</constant>, 21902f4aeb0Sopenharmony_ci <constant>EGL_RENDER_BUFFER</constant>, 22002f4aeb0Sopenharmony_ci <constant>EGL_SWAP_BEHAVIOR</constant>, and 22102f4aeb0Sopenharmony_ci <constant>EGL_VERTICAL_RESOLUTION</constant> are supported 22202f4aeb0Sopenharmony_ci only if the EGL version is 1.2 or greater. 22302f4aeb0Sopenharmony_ci </para> 22402f4aeb0Sopenharmony_ci <para> 22502f4aeb0Sopenharmony_ci Querying attributes <constant>EGL_TEXTURE_FORMAT</constant>, 22602f4aeb0Sopenharmony_ci <constant>EGL_TEXTURE_TARGET</constant>, 22702f4aeb0Sopenharmony_ci <constant>EGL_MIPMAP_TEXTURE</constant>, or 22802f4aeb0Sopenharmony_ci <constant>EGL_MIPMAP_LEVEL</constant> for a non-pbuffer 22902f4aeb0Sopenharmony_ci surface is not an error, but <parameter>value</parameter> is 23002f4aeb0Sopenharmony_ci not modified. 23102f4aeb0Sopenharmony_ci </para> 23202f4aeb0Sopenharmony_ci <para> 23302f4aeb0Sopenharmony_ci <constant>EGL_DISPLAY_SCALING</constant> is the constant 23402f4aeb0Sopenharmony_ci value 10000. Floating-point values such as resolution and 23502f4aeb0Sopenharmony_ci pixel aspect ratio are scaled by this value before being 23602f4aeb0Sopenharmony_ci returned as integers so that sufficient precision to be 23702f4aeb0Sopenharmony_ci meaningful will be retained in the returned value. 23802f4aeb0Sopenharmony_ci </para> 23902f4aeb0Sopenharmony_ci <para> 24002f4aeb0Sopenharmony_ci For an offscreen (pbuffer or pixmap) surface, or a surface 24102f4aeb0Sopenharmony_ci whose pixel dot pitch or aspect ratio are unknown, querying 24202f4aeb0Sopenharmony_ci <constant>EGL_HORIZONTAL_RESOLUTION</constant>, 24302f4aeb0Sopenharmony_ci <constant>EGL_PIXEL_ASPECT_RATIO</constant>, or 24402f4aeb0Sopenharmony_ci <constant>EGL_VERTICAL_RESOLUTION</constant> will return the 24502f4aeb0Sopenharmony_ci constant value <constant>EGL_UNKNOWN</constant> (-1). 24602f4aeb0Sopenharmony_ci </para> 24702f4aeb0Sopenharmony_ci </refsect1> 24802f4aeb0Sopenharmony_ci <refsect1 id="errors"><title>Errors</title> 24902f4aeb0Sopenharmony_ci <para> 25002f4aeb0Sopenharmony_ci <constant>EGL_FALSE</constant> is returned on failure, 25102f4aeb0Sopenharmony_ci <constant>EGL_TRUE</constant> otherwise. 25202f4aeb0Sopenharmony_ci <parameter>value</parameter> is not modified when 25302f4aeb0Sopenharmony_ci <constant>EGL_FALSE</constant> is returned. 25402f4aeb0Sopenharmony_ci </para> 25502f4aeb0Sopenharmony_ci <para> 25602f4aeb0Sopenharmony_ci <constant>EGL_BAD_DISPLAY</constant> is generated if 25702f4aeb0Sopenharmony_ci <parameter>display</parameter> is not an EGL display connection. 25802f4aeb0Sopenharmony_ci </para> 25902f4aeb0Sopenharmony_ci <para> 26002f4aeb0Sopenharmony_ci <constant>EGL_NOT_INITIALIZED</constant> is generated if 26102f4aeb0Sopenharmony_ci <parameter>display</parameter> has not been initialized. 26202f4aeb0Sopenharmony_ci </para> 26302f4aeb0Sopenharmony_ci <para> 26402f4aeb0Sopenharmony_ci <constant>EGL_BAD_SURFACE</constant> is generated if 26502f4aeb0Sopenharmony_ci <parameter>surface</parameter> is not an EGL surface. 26602f4aeb0Sopenharmony_ci </para> 26702f4aeb0Sopenharmony_ci <para> 26802f4aeb0Sopenharmony_ci <constant>EGL_BAD_ATTRIBUTE</constant> is generated if 26902f4aeb0Sopenharmony_ci <parameter>attribute</parameter> is not a valid surface attribute. 27002f4aeb0Sopenharmony_ci </para> 27102f4aeb0Sopenharmony_ci </refsect1> 27202f4aeb0Sopenharmony_ci <refsect1 id="seealso"><title>See Also</title> 27302f4aeb0Sopenharmony_ci <para> 27402f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePbufferSurface</refentrytitle></citerefentry>, 27502f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreatePixmapSurface</refentrytitle></citerefentry>, 27602f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglCreateWindowSurface</refentrytitle></citerefentry>, 27702f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSurfaceAttrib</refentrytitle></citerefentry>, 27802f4aeb0Sopenharmony_ci <citerefentry><refentrytitle>eglSwapBuffers</refentrytitle></citerefentry> 27902f4aeb0Sopenharmony_ci </para> 28002f4aeb0Sopenharmony_ci </refsect1> 28102f4aeb0Sopenharmony_ci <refsect3 id="Copyright"><title></title> 28202f4aeb0Sopenharmony_ci <!-- Content included from copyright.inc.xsl --> 28302f4aeb0Sopenharmony_ci <imageobject> 28402f4aeb0Sopenharmony_ci <imagedata fileref="KhronosLogo.jpg" format="jpg" /> 28502f4aeb0Sopenharmony_ci </imageobject> 28602f4aeb0Sopenharmony_ci <para /> 28702f4aeb0Sopenharmony_ci </refsect3> 28802f4aeb0Sopenharmony_ci</refentry> 289