1<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:base="" xml:id="eglQueryContext"> 2 <info> 3 <copyright> 4 <year>2003-2014</year> 5 <holder>The Khronos Group Inc.</holder> 6 </copyright> 7 </info> 8 <refmeta> 9 <refentrytitle>eglQueryContext</refentrytitle> 10 <manvolnum>3G</manvolnum> 11 </refmeta> 12 <refnamediv> 13 <refname>eglQueryContext</refname> 14 <refpurpose> 15 return <acronym>EGL</acronym> rendering context information 16 </refpurpose> 17 </refnamediv> 18 <refsynopsisdiv> 19 <title>C Specification</title> 20 <funcsynopsis> 21 <funcprototype> 22 <funcdef>EGLBoolean <function>eglQueryContext</function></funcdef> 23 <paramdef>EGLDisplay <parameter>display</parameter></paramdef> 24 <paramdef>EGLContext <parameter>context</parameter></paramdef> 25 <paramdef>EGLint <parameter>attribute</parameter></paramdef> 26 <paramdef>EGLint * <parameter>value</parameter></paramdef> 27 </funcprototype> 28 </funcsynopsis> 29 </refsynopsisdiv> 30 <refsect1 xml:id="parameters"><title>Parameters</title> 31 <variablelist> 32 <varlistentry> 33 <term><parameter>display</parameter></term> 34 <listitem> 35 <para> 36 Specifies the EGL display connection. 37 </para> 38 </listitem> 39 </varlistentry> 40 <varlistentry> 41 <term><parameter>context</parameter></term> 42 <listitem> 43 <para> 44 Specifies the EGL rendering context to query. 45 </para> 46 </listitem> 47 </varlistentry> 48 <varlistentry> 49 <term><parameter>attribute</parameter></term> 50 <listitem> 51 <para> 52 Specifies the EGL rendering context attribute to be returned. 53 </para> 54 </listitem> 55 </varlistentry> 56 <varlistentry> 57 <term><parameter>value</parameter></term> 58 <listitem> 59 <para> 60 Returns the requested value. 61 </para> 62 </listitem> 63 </varlistentry> 64 </variablelist> 65 </refsect1> 66 <refsect1 xml:id="description"><title>Description</title> 67 <para> 68 <function>eglQueryContext</function> returns in 69 <parameter>value</parameter> the value of 70 <parameter>attribute</parameter> for <parameter>context</parameter>. 71 <parameter>attribute</parameter> can be one of the following: 72 </para> 73 <variablelist> 74 <varlistentry> 75 <term><constant>EGL_CONFIG_ID</constant></term> 76 <listitem><para> 77 Returns the ID of the EGL frame buffer configuration 78 with respect to which the context was created. 79 </para></listitem> 80 </varlistentry> 81 <varlistentry> 82 <term><constant>EGL_CONTEXT_CLIENT_TYPE</constant></term> 83 <listitem><para> 84 Returns the type of client API which the context 85 supports (one of 86 <constant>EGL_OPENGL_API</constant>, 87 <constant>EGL_OPENGL_ES_API</constant>, or 88 <constant>EGL_OPENVG_API</constant>). 89 </para></listitem> 90 </varlistentry> 91 <varlistentry> 92 <term><constant>EGL_CONTEXT_CLIENT_VERSION</constant></term> 93 <listitem><para> 94 Returns the version of the client API which the 95 context supports, as specified at context creation 96 time. The resulting value is only meaningful for an 97 OpenGL ES context. 98 </para></listitem> 99 </varlistentry> 100 <varlistentry> 101 <term><constant>EGL_RENDER_BUFFER</constant></term> 102 <listitem> 103 <para> 104 Returns the buffer which client API rendering 105 via the context will use. The value returned 106 depends on properties of both the context, and 107 the surface to which the context is bound: 108 </para> 109 <itemizedlist> 110 <listitem><para> 111 If the context is bound to a pixmap surface, 112 then <constant>EGL_SINGLE_BUFFER</constant> will 113 be returned. 114 </para></listitem> 115 <listitem><para> 116 If the context is bound to a pbuffer surface, 117 then <constant>EGL_BACK_BUFFER</constant> will 118 be returned. 119 </para></listitem> 120 <listitem><para> 121 If the context is bound to a window surface, 122 then either <constant>EGL_BACK_BUFFER</constant> 123 or <constant>EGL_SINGLE_BUFFER</constant> may be 124 returned. The value returned depends on both the 125 buffer requested by the setting of the 126 <constant>EGL_RENDER_BUFFER</constant> property 127 of the surface (which may be queried by calling 128 <function>eglQuerySurface</function>), and on 129 the client API (not all client APIs support 130 single-buffer rendering to window surfaces). 131 </para></listitem> 132 <listitem><para> 133 If the context is not bound to a surface, such 134 as an OpenGL ES context bound to a framebuffer 135 object, then <constant>EGL_NONE</constant> will 136 be returned. 137 </para></listitem> 138 </itemizedlist> 139 </listitem> 140 </varlistentry> 141 </variablelist> 142 </refsect1> 143 <refsect1 xml:id="notes"><title>Notes</title> 144 <para> 145 Attributes <constant>EGL_CONTEXT_CLIENT_TYPE</constant> and 146 <constant>EGL_RENDER_BUFFER</constant> are supported only if 147 the EGL version is 1.2 or greater. 148 </para> 149 <para> 150 Attribute <constant>EGL_CONTEXT_CLIENT_VERSION</constant> is 151 supported only if the EGL version is 1.3 or greater. 152 </para> 153 </refsect1> 154 <refsect1 xml:id="errors"><title>Errors</title> 155 <para> 156 <constant>EGL_FALSE</constant> is returned on failure, 157 <constant>EGL_TRUE</constant> otherwise. 158 <parameter>value</parameter> is not modified when 159 <constant>EGL_FALSE</constant> is returned. 160 </para> 161 <para> 162 <constant>EGL_BAD_DISPLAY</constant> is generated if 163 <parameter>display</parameter> is not an EGL display connection. 164 </para> 165 <para> 166 <constant>EGL_NOT_INITIALIZED</constant> is generated if 167 <parameter>display</parameter> has not been initialized. 168 </para> 169 <para> 170 <constant>EGL_BAD_CONTEXT</constant> is generated if 171 <parameter>context</parameter> is not an EGL rendering context. 172 </para> 173 <para> 174 <constant>EGL_BAD_ATTRIBUTE</constant> is generated if 175 <parameter>attribute</parameter> is not a valid context attribute. 176 </para> 177 </refsect1> 178 <refsect1 xml:id="seealso"><title>See Also</title> 179 <para> 180 <citerefentry><refentrytitle>eglCreateContext</refentrytitle></citerefentry> 181 </para> 182 </refsect1> 183 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/> 184</refentry> 185