summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Remove the autotools build system.Eric Anholt2019-11-261-42/+0
| | | | Meson has been out for a long time, is faster, and is simpler.
* Remove Python 2 supportEmmanuele Bassi2019-11-141-1/+0
| | | | | Python 2 is going to reach EOL in January 2020, and most platforms have already moved to Python 3.
* Add epoxy_glsl_version()Emmanuele Bassi2018-02-231-0/+1
| | | | | | | | Epoxy should provide a function that returns the version of the GL shading language in use, in the same vein as it allows to get the version of GL. Closes: #145
* Merge pull request #136 from Lyude/pull/epoxy_ext_in_strEmmanuele Bassi2017-10-191-0/+7
|\ | | | | Expose epoxy_extension_in_string() in public headers
| * Expose epoxy_extension_in_string() in public headersLyude Paul2017-08-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EGL_EXT_device_query extension introduces the eglQueryDeviceStringEXT() function, which can be used with an EGLDeviceEXT enumeration to receive an OpenGL extension string containing all of the device extensions supported by it. From the EGL_EXT_device_query spec's amendments to section "3.2 Devices" after "3.1 Errors": const char *eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name); returns a pointer to a static, zero-terminated string describing some aspect of the specified EGLDeviceEXT. <name> must be EGL_EXTENSIONS. Since OpenGL extension parsing is rather simple, and we could always run into additional cases similar to this one in the future, we expose the shared epoxy_extension_in_string() function in libepoxy's public headers so that users can save themselves the hassle of having to write their own extension parser. Signed-off-by: Lyude Paul <thatslyude@gmail.com>
* | Add epoxy_set_resolver_failure_handler()Adam Jackson2017-07-141-0/+14
|/ | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Move epoxy_headers definition into include/epoxyEmmanuele Bassi2017-03-281-0/+2
| | | | | | | | | | | | In order to properly depend on headers, both generated and provided, in a separate directory, we need to refer to them using their path. Generated headers already have their full path; for provided ones, we can simply use the `files()` directive. This change should allow using libepoxy as a Meson subproject. Fixes: #115
* Add C++ guards around generated headersEmmanuele Bassi2017-03-034-8/+8
| | | | | | | | | Commit 0625a74d69f762df8d411bc0451927424aee1f2c moved the C++ guards after the inclusion of the generated headers, which was an unintended behavioural change and now requires header guards around the inclusion of Epoxy headers. Fixes: #106
* Simplify the code generation rules for MesonEmmanuele Bassi2017-03-011-69/+29
| | | | | | | | | | | | The code generation rules are explicitly built for each supported API target, but they ought to be refactored since they are pretty much identical. In order to do that, we can store the arguments to the custom_target rules inside an array and then iterate over each element. This cuts down the complexity of the Meson build, and the chances of getting something wrong due to duplication.
* Remove the shebang from gen_dispatch.pyEmmanuele Bassi2017-02-151-0/+4
| | | | | | | | Instead of having Meson determine the invocator through the shebang line we explicitly pass the script file to the Python interpreter. This will allow us to either use Python3 or Python2, or whatever Python.exe is available on Windows.
* Update the symbol visibility rules under MSVCEmmanuele Bassi2017-02-081-1/+5
| | | | | | | | | | | | | | For the Visual Studio C compiler we need to annotate our public symbols with `__declspec(dllimport)` to ensure they are visible when dynamically linking to Epoxy's DLL. This is needed because under Windows we use a dispatch table, instead of wrapper functions, thus the symbol visibility rules change. Compiling with MingW will automatically add `__declspec(dllimport)` for us. Thanks to Nirbheek Chauhan for the help in debugging the issue. Fixes #104
* Merge pull request #100 from centricular/fix-find_programEmmanuele Bassi2017-02-081-4/+0
|\ | | | | meson: Don't call find_program objects with python
| * meson: Don't call find_program objects with pythonNirbheek Chauhan2017-01-281-4/+0
| | | | | | | | | | | | | | | | On UNIX-like OSes, the OS will read the shebang and use the correct interpreter, and on Windows, Meson will read the shebang and use the correct interpreter. Adding it manually will cause python to try to interpret python
* | Add epoxy_has_egl()Emmanuele Bassi2017-02-031-0/+1
| | | | | | | | Similar to `epoxy_has_glx()`, but for the EGL windowing system API.
* | Add epoxy_has_glx()Emmanuele Bassi2017-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | Libraries and applications that depend on Epoxy currently have no way to safely degrade functionality if they are used on a platform without GLX support; the only way to achieve that is to perform a symbol check themselves, by essentially copying what Epoxy already does. By exposing `epoxy_has_glx()`, those libraries and applications now have the chance of querying Epoxy itself and gracefully handle failure.
* | Write the API referenceEmmanuele Bassi2017-02-033-0/+6
| | | | | | | | | | Now that we have Doxygen generating it, we should fill out the API reference for Epoxy.
* | Add a fallback for missing stdbool.hEmmanuele Bassi2017-02-015-6/+8
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'symbol-visibility'Emmanuele Bassi2017-01-317-43/+75
|\ \
| * | Improve consistency of the symbol visibilityEmmanuele Bassi2017-01-255-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Add common headerEmmanuele Bassi2017-01-257-29/+62
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | build: Clean up some Meson usagePatrick Griffis2017-01-271-4/+4
|/
* build: Rework the build rules for generated files in MesonEmmanuele Bassi2017-01-251-0/+80
| | | | | | | | | | | | | | | | | | | | | Instead of using a generator and having to deal with tweaking the inclusion paths, we can use a custom target rule, which will do the right thing and put the generate files where we expect them to be. Due to how Meson and Ninja work we need to be a bit more careful as to how we deal with dependencies and generated files, especially since Epoxy is built on the assumption that the only inclusion path for the headers lies under the 'include' sub-directory. First of all, we need to split the dispatch table generation into two separate steps, one for the headers and one for the source files. Additionally, we need to munge the paths of the non-generated headers so that we reference them by their correct path. These changes are necessary to ensure that Epoxy can be built on a system without Epoxy installed already; the previous Meson-based build system relied on the headers being installed in a system directory.
* nVidia glx.h uses __glx_h__; define that too.Bryan Kadzban2016-12-071-0/+1
| | | | | | | | | | | | The code used to check this symbol, but commit 689abf4 replaced it with GLX_H, presumably to work better with either Mesa or Khronos headers. But nVidia's header use the older include guard. Add it as another option. Should fix the headerguards.c compile test when the system glx.h is from nVidia's binary drivers. Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* Revert all changes since 8bbc0d40Emmanuele Bassi2016-12-0714-22161/+69
| | | | | | | | | | | | | | | 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.
* build: Drop autogenerated autotools files from GitEmmanuele Bassi2016-11-071-610/+0
| | | | | | | | | These files should not be under revision control. This commit partially reverts: * 06fd4a271ad88476d8c6a37d49b6a8af5a11d988 * 62e384129b5b9243634ca4a71108c6f8699a24bd
* nVidia glx.h uses __glx_h__; define that too.Bryan Kadzban2016-09-061-1/+2
| | | | | | | | | | The code used to check this symbol, but commit 689abf4 replaced it with GLX_H, presumably to work better with either Mesa or Khronos headers. But nVidia's header use the older include guard. Add it as another option. Should fix the headerguards.c compile test when the system glx.h is from nVidia's binary drivers.
* Make "epoxy_current_context_is_egl" visible.Yaron Cohen-Tal2015-10-311-0/+1
|
* Fix support for a static build of Epoxy. Add support building and running ↵Yaron Cohen-Tal2015-09-031-11/+18
| | | | tests with CMake. Add support for linking with the static run-time library with MSVC.
* Add some files to the repo so that it's possible to build without running ↵Yaron Cohen-Tal2015-08-262-0/+654
| | | | "autogen.sh".
* Add support for CMake (no support for building/running the tests yet). Fix ↵Yaron Cohen-Tal2015-08-2613-66/+22044
| | | | 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).
* Add new header file "common.h" to the installed files.Yaron Cohen-Tal2015-07-191-0/+1
|
* Unite defenitions "PUBLIC" and "EPOXY_IMPORTEXPORT" and add it where ↵Yaron Cohen-Tal2015-07-195-20/+80
| | | | appropriate. Fix tests build errors.
* Added makefiles to build with MSVC 2013, and fixed errors and warnings.Yaron Cohen-Tal2015-07-181-2/+2
|
* Fix public headers for building in Visual StudioChun-wei Fan2015-06-052-5/+5
| | | | | | | Ensure that we also have import/export decorations for the prototypes, as Visual Studio does not like such decorations on the function definitions without the prototypes decorated as well, when the function prototypes exist.
* Don't forget to install the wgl headers.Eric Anholt2014-05-131-0/+5
| | | | Fixes #26
* Move __stdcall into the parens for function pointer definitions.Eric Anholt2014-04-101-3/+8
| | | | MSVC 2010 appears to require that it be located there.
* win32: Add support for wglUseFontBitmaps().Eric Anholt2014-03-271-0/+6
| | | | Fixes #10.
* Fix EGLDisplay parameters in epoxy functionsFredrik Höglund2014-02-121-2/+2
| | | | EGLDisplay is typedefed as a pointer.
* Add limited support for the KHRONOS_* defines from khrplatform.h.Eric Anholt2014-02-061-0/+11
| | | | | | | | | | The only way these get used is when you choose to include epoxy/gl.h but EGL/egl.h. I'm not sure that's something I want to actually support, but piglit happened to do so, and this gets things working. There's not as much support here as in real khrplatform.h, but then there's no EGL for windows. And seriously, compilers support 64-bit and float types, why would you even build this complexity?
* Avoid polluting the compiler's namespace with our own stuff.Eric Anholt2014-01-224-12/+12
| | | | | | | | 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
* win32: Convert the API to being based on function pointers, like Linux.Eric Anholt2013-12-171-1/+1
| | | | | | | | | | For performance, I want to be able to make single-context (well, single-pixel-format-and-device) apps be able to directly call GL functions through function pointers. Bake that into the ABI now so I can get a release out the door and fix this up later. This also fixes the lack of __stdcall annotation on the PFNWHATEVERPROC typedefs.
* win32: Expose the dispatch table reset funtion in the public API.Eric Anholt2013-12-171-0/+1
| | | | Fixes #2.
* Don't forget to tell our users that the epoxy GL functions are __dllimport.Eric Anholt2013-12-171-0/+5
| | | | | | This lets the compiler generate faster function calls (call through function pointer, instead of call into a linker-generated stub func containing jump to function pointer).
* Fix copyrights on the Makefile.ams.Eric Anholt2013-12-161-16/+17
| | | | | | | When initially writing the Makefiles, I started from a Makefile.am that had ajax's copyright instead of an Intel one. The only line I can see that's left from the original Makefile.am is "pkgconfigdir" in the root Makefile.am.
* Update header comments about how the implementation works.Eric Anholt2013-12-163-23/+6
|
* Drop the inconsistent use of #pragma once.Eric Anholt2013-12-163-6/+0
| | | | | Apparently it's not totally portable, and the #ifdefs work fine (and equivalently to the pragma, on some compilers).
* Move the #defines into the main generated header.Eric Anholt2013-12-154-4/+0
| | | | | I initially thought I was going to have two sets of defines you chose from using #include, but that never ended up being necessary.
* Include epoxy/gl.h from epoxy/glx.h.Eric Anholt2013-12-121-0/+1
| | | | This gives us consistency with GL/glx.h's include of GL/gl.h.
* Add dispatch generation for wgl.Eric Anholt2013-12-101-0/+60
| | | | This is very poorly tested at this point, but survives a simple testcase.
* Conditionalize building GLX and EGL tests and headers.Eric Anholt2013-12-061-0/+5
| | | | | | | Note that the generated code is still generated, they just aren't built and installed. The goal with that is that someone could take the built .c and .h files and drop it into their own project, if they want to avoid shared libs.