• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:base="" xml:id="eglGetProcAddress">
2    <info>
3         <copyright>
4             <year>2003-2018</year>
5             <holder>The Khronos Group Inc.</holder>
6         </copyright>
7    </info>
8    <refmeta>
9        <refentrytitle>eglGetProcAddress</refentrytitle>
10        <manvolnum>3G</manvolnum>
11    </refmeta>
12    <refnamediv>
13        <refname>eglGetProcAddress</refname>
14        <refpurpose>
15            return a <acronym>GL</acronym> or an <acronym>EGL</acronym>
16            extension function
17        </refpurpose>
18    </refnamediv>
19    <refsynopsisdiv>
20        <title>C Specification</title>
21        <funcsynopsis>
22            <funcprototype>
23                <funcdef>void (* <function>eglGetProcAddress</function></funcdef>
24                <paramdef>char const * <parameter>procname</parameter>))(void</paramdef>
25            </funcprototype>
26        </funcsynopsis>
27    </refsynopsisdiv>
28    <refsect1 xml:id="parameters"><title>Parameters</title>
29        <variablelist>
30            <varlistentry>
31                <term><parameter>procname</parameter></term>
32                <listitem>
33                    <para>
34                        Specifies the name of the function to return.
35                    </para>
36                </listitem>
37            </varlistentry>
38        </variablelist>
39    </refsect1>
40    <refsect1 xml:id="description"><title>Description</title>
41        <para>
42            <function>eglGetProcAddress</function> returns the address of
43            the client API or EGL function named by
44            <parameter>procname</parameter>. <parameter>procname</parameter>
45            must be a null-terminated string. The pointer returned should be
46            cast to a function pointer matching the function's definition in
47            the corresponding API or extension specification. A return value
48            of <constant>NULL</constant> indicates that the specific
49            function does not exist for the implementation.
50        </para>
51        <para>
52            A non-<constant>NULL</constant> return value does not guarantee
53            that an extension function is actually supported at runtime. The
54            client must also make a corresponding query, such as
55            <function>glGetString</function>(<constant>GL_EXTENSIONS</constant>)
56            for OpenGL and OpenGL ES extensions;
57            <function>vgGetString</function>(<constant>VG_EXTENSIONS</constant>)
58            for OpenVG extensions;
59            <function>eglQueryString</function>(<parameter>display</parameter>,
60            <constant>EGL_EXTENSIONS</constant>); or query the EGL or client
61            API version for non-extension functions, to determine if a
62            function is supported by EGL or a specific client API context.
63        </para>
64        <para>
65            Client API function pointers returned by
66            <function>eglGetProcAddress</function> are independent of the
67            display and the currently bound client API context, and may be
68            used by any client API context which supports the function.
69        </para>
70        <para>
71            <function>eglGetProcAddress</function> may be queried for all
72            EGL and client API functions supported by the implementation
73            (whether those functions are extensions or not, and whether they
74            are supported by the current client API context or not).
75        </para>
76        <para>
77            For functions that are queryable with
78            <function>eglGetProcAddress</function>, implementations may
79            choose to also export those functions statically from the object
80            libraries implementing those functions. However, portable
81            clients cannot rely on this behavior.
82        </para>
83    </refsect1>
84    <refsect1 xml:id="notes"><title>Notes</title>
85        <para>
86            If the EGL version is not 1.5 or greater, only queries of EGL
87            and client API <emphasis>extension</emphasis> functions will
88            succeed.
89        </para>
90    </refsect1>
91    <refsect1 xml:id="seealso"><title>See Also</title>
92        <para>
93            <function>glGetString</function>
94            <citerefentry><refentrytitle>eglQueryString</refentrytitle></citerefentry>    </para>
95            <function>vgGetString</function>
96    </refsect1>
97    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/>
98</refentry>
99