Commit Graph
15 Commits
Author SHA1 Message Date
Emmanuele Bassi 075172f485 Add epoxy_has_egl()
Similar to `epoxy_has_glx()`, but for the EGL windowing system API.
2017-02-03 16:19:30 +00:00
Emmanuele Bassi 6af57b0745 Write the API reference
Now that we have Doxygen generating it, we should fill out the API
reference for Epoxy.
2017-02-03 11:13:30 +00:00
Emmanuele Bassi 6973dd5db3 Add a fallback for missing stdbool.h
Older versions of the Microsoft Visual C compiler do not support C99 and
do not have stdbool.h.

Additionally, Epoxy is pretty much C89 compliant, and stdbool.h is part
of C99.

We can add a simple fallback for MSVC, in case we end up getting built
with it.
2017-02-01 00:02:16 +00:00
Emmanuele Bassi 7a06803465 Improve consistency of the symbol visibility
To avoid a symbols file on Windows, Epoxy annotates all the publicly
visible symbols directly in the source, but uses the default symbol
visibility everywhere else. This means that only some symbols are
annotated as `EPOXY_IMPORTEXPORT`, and generally only on Windows.
Additionally, Epoxy has a private 'PUBLIC' pre-processor macro for
internal use, which duplicates the `EPOXY_IMPORTEXPORT` but contains
more logic to detect GCC, in case we're building with GCC on Windows.

This would be enough, except that EGL is also available on Windows,
which means we'd have to annotate the exported `epoxy_*` API inside
epoxy/egl.h as well. At that point, though, we should probably avoid
any confusion, and adopt a single symbol visibility policy across the
board.

This requires some surgery of the generated and common dispatch sources,
but cuts down the overall complexity:

 - there is only one annotation, `EPOXY_PUBLIC`, used everywhere
 - the annotation detection is done at Epoxy configuration time
 - only annotated symbols are public, on every platform
 - annotated symbols are immediately visible from the header
2017-01-25 12:43:17 +00:00
Emmanuele Bassi 0625a74d69 Add common header
We're going to use this header to provide shared macros. Right now, we
can use it to replace the:

    #ifdef __cplusplus
    extern "C" {
    #endif

    …

    #ifdef __cplusplus
    }
    #endif

Stanzas for every installed header, with easier to read macros in the
same spirit of Cairo and GLib.
2017-01-25 12:43:17 +00:00
Emmanuele Bassi 8dead45cb3 Revert all changes since 8bbc0d40
Most of the changes that happened after commit 8bbc0d40 broke epoxy
pretty much irreparably because of the CMake build and the attempt at
making libepoxy a static library that can be copy-pasted into another
project without generating files.

Since all the commits are entangled, and are full of unrelated changes,
we cannot simply do a localized set of reverts; instead, we need to hit
the reset button.

From this point forward, we're going to improve libepoxy's build while
attempting to keep the existing build system working. This may mean
reinstating the CMake build system at a later date.
2016-12-07 14:45:14 +00:00
Yaron Cohen-Tal 06fd4a271a Add support for CMake (no support for building/running the tests yet). Fix support for Android. Add built-in support for building with EGL support (using "khrplatform.h" and "eglplatform.h" which are distributed together with Epoxy, and should work with any platform). 2015-08-26 19:41:51 +03:00
Yaron Cohen-Tal 90c6158d61 Unite defenitions "PUBLIC" and "EPOXY_IMPORTEXPORT" and add it where appropriate. Fix tests build errors. 2015-07-19 13:40:35 +03:00
Yaron Cohen-Tal 773dd02f59 Added makefiles to build with MSVC 2013, and fixed errors and warnings. 2015-07-18 17:39:12 +03:00
Fredrik Höglund e20b3ce6c7 Fix EGLDisplay parameters in epoxy functions
EGLDisplay is typedefed as a pointer.
2014-02-12 00:56:57 +01:00
Eric Anholt f10bff9bc0 Avoid polluting the compiler's namespace with our own stuff.
We can't completely avoid it, since gl's headers use these defines for
their header guards, and we really do need to stop the system GL
headers from doing anything.

Fixes #14
2014-01-22 01:00:56 -08:00
Eric Anholt 21f4346af0 Update header comments about how the implementation works. 2013-12-16 09:18:58 -08:00
Eric Anholt fa7aa87bc0 Drop the inconsistent use of #pragma once.
Apparently it's not totally portable, and the #ifdefs work fine (and
equivalently to the pragma, on some compilers).
2013-12-16 09:14:31 -08:00
Eric Anholt 982e39f188 Move the #defines into the main generated header.
I initially thought I was going to have two sets of defines you chose
from using #include, but that never ended up being necessary.
2013-12-15 20:16:01 -08:00
Eric Anholt 0270c80008 Add support for EGL.
This totally replaces the getprocaddress and dlsym code, which was
basically just stubs up until now.  The is_glx/is_egl() is also
dropped -- they weren't doing anything, and the only false answer they
could give is if the dlopen were to fail.
2013-12-05 12:38:15 -08:00