gitlab-ci: enable sanitizers for the meson builds
[mesa-waffle.git] / man / waffle_get_proc_address.3.xml
blobaf29939ece2cf78dc711646b34a508e168358187
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <!--
6   Copyright Intel 2012
8   This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0
9   US). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.
10 -->
12 <refentry
13     id="waffle_get_proc_address"
14     xmlns:xi="http://www.w3.org/2001/XInclude">
16   <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->
18   <refmeta>
19     <refentrytitle>waffle_get_proc_address</refentrytitle>
20     <manvolnum>3</manvolnum>
21   </refmeta>
23   <refnamediv>
24     <refname>waffle_get_proc_address</refname>
25     <refpurpose>Query address of OpenGL functions</refpurpose>
26   </refnamediv>
28   <refentryinfo>
29     <title>Waffle Manual</title>
30     <productname>waffle</productname>
31     <xi:include href="common/author-lina.versace.xml"/>
32     <xi:include href="common/copyright.xml"/>
33     <xi:include href="common/legalnotice.xml"/>
34   </refentryinfo>
36   <refsynopsisdiv>
38     <funcsynopsis language="C">
40       <funcsynopsisinfo>
41 #include &lt;waffle.h&gt;
42       </funcsynopsisinfo>
44       <funcprototype>
45         <funcdef>void* <function>waffle_get_proc_address</function></funcdef>
46         <paramdef>const char *<parameter>name</parameter></paramdef>
47       </funcprototype>
49     </funcsynopsis>
50   </refsynopsisdiv>
52   <refsect1>
53     <title>Description</title>
55     <variablelist>
56       <varlistentry>
57         <term><function>waffle_get_proc_address()</function></term>
58         <listitem>
59           <para>
60             On GLX, this redirects to
61             <citerefentry><refentrytitle><function>glXGetProcAddress</function></refentrytitle><manvolnum>3</manvolnum></citerefentry>.
63             On EGL, this redirects to
64             <citerefentry><refentrytitle><function>eglGetProcAddress</function></refentrytitle><manvolnum>3</manvolnum></citerefentry>.
66             On CGL, this function returns <constant>NULL</constant>
68             because there exists no <function>CGLGetProcAdress()</function>.
70             On WGL, this redirects to
71             <citerefentry><refentrytitle><function>wglGetProcAddress</function></refentrytitle><manvolnum>3</manvolnum></citerefentry>.
72           </para>
74           <para>
75             Some aspects of this function's behavior are platform-specific and non-intuitive.
77             For example,
79             <itemizedlist>
80               <listitem>
81                 <para>
82                   If the queried function is not available,
84                   <function>waffle_get_proc_address()</function> may return a non-null pointer.
85                 </para>
86               </listitem>
88               <listitem>
89                 <para>
90                   If the queried function is statically exposed by the OpenGL library of a given API,
92                   then <function>waffle_get_proc_address()</function> may return a <constant>NULL</constant>.
93                 </para>
94               </listitem>
96               <listitem>
97                 <para>
98                   Under Windows (WGL) a current context must be available before executing the function.
100                   Otherwise <function>waffle_get_proc_address()</function> may return a <constant>NULL</constant>.
101                 </para>
102               </listitem>
103             </itemizedlist>
104           </para>
106           <para>
107             For details on this function's behavior,
109             see the specification for the relevant platform:
111             the <ulink url="http://www.opengl.org/registry/doc/glx1.4.pdf">GLX 1.4 Specification</ulink>
113             the <ulink url="http://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf">EGL 1.4 Specification</ulink>
115             or the <ulink url="http://msdn.microsoft.com/en-gb/library/windows/desktop/dd374386(v=vs.85).aspx">MSDN article</ulink>.
116           </para>
117         </listitem>
118       </varlistentry>
119     </variablelist>
120   </refsect1>
122   <refsect1>
123     <title>Errors</title>
125     <xi:include href="common/error-codes.xml"/>
127     <para>
128       No errors are specific to any functions listed in this manual page.
129     </para>
130   </refsect1>
132   <xi:include href="common/issues.xml"/>
134   <refsect1>
135     <title>See Also</title>
136     <para>
137       <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
138       <citerefentry><refentrytitle>waffle_dl_sym</refentrytitle><manvolnum>3</manvolnum></citerefentry>
139     </para>
140   </refsect1>
142 </refentry>
144 <!--
145 vim:tw=120 et ts=2 sw=2: