2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
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.
14 xmlns:xi="http://www.w3.org/2001/XInclude">
16 <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->
19 <refentrytitle>waffle_dl</refentrytitle>
20 <manvolnum>3</manvolnum>
24 <refname>waffle_dl</refname>
25 <refname>waffle_dl_can_open</refname>
26 <refname>waffle_dl_sym</refname>
27 <refpurpose>platform-independent interface to dynamic libraries</refpurpose>
31 <title>Waffle Manual</title>
32 <productname>waffle</productname>
33 <xi:include href="common/author-chad.versace.xml"/>
34 <xi:include href="common/copyright.xml"/>
35 <xi:include href="common/legalnotice.xml"/>
40 <funcsynopsis language="C">
42 <funcsynopsisinfo>#include <waffle.h></funcsynopsisinfo>
45 <funcdef>bool <function>waffle_dl_can_open</function></funcdef>
46 <paramdef>int32_t <parameter>dl</parameter></paramdef>
50 <funcdef>void* <function>waffle_dl_sym</function></funcdef>
51 <paramdef>int32_t <parameter>dl</parameter></paramdef>
52 <paramdef>const char* <parameter>symbol</parameter></paramdef>
59 <title>Description</title>
62 The waffle_dl functions provide a platform-independent interface for dynamic OpenGL libraries. For each function,
63 the parameter <parameter>dl</parameter> must be one of:
64 <simplelist type="vertical">
65 <member><constant>WAFFLE_DL_OPENGL</constant></member>
66 <member><constant>WAFFLE_DL_OPENGL_ES1</constant></member>
67 <member><constant>WAFFLE_DL_OPENGL_ES2</constant></member>
68 <member><constant>WAFFLE_DL_OPENGL_ES3</constant></member>
73 For example, on Linux, the <constant>WAFFLE_DL_*</constant> enums map to
74 <filename>libGL.so.1</filename>,
75 <filename>libGLESv1_CM.so.1</filename>,
76 <filename>libGLESv2.so.2</filename>, and
77 <filename>libGLESv2.so.2</filename>, respectively.
83 <term><function>waffle_dl_can_open()</function></term>
86 Test if a dynamic library can be opened.
92 <term><function>waffle_dl_sym()</function></term>
95 Get a <parameter>symbol</parameter> from a dynamic library.
104 <title>Return Value</title>
105 <xi:include href="common/return-value.xml"/>
109 <title>Errors</title>
112 If waffle fails to find the requested library on the system, then
113 <constant>WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM</constant> is emitted.
116 <xi:include href="common/error-codes.xml"/>
120 <xi:include href="common/issues.xml"/>
123 <title>See Also</title>
125 <citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
126 <citerefentry><refentrytitle>waffle_get_proc_address</refentrytitle><manvolnum>3</manvolnum></citerefentry>
133 vim:tw=120 et ts=2 sw=2: