| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Linux and other Unix variants we may not have access to GLX and EGL
at run time. Dependent libraries can only discover this by using dlsym()
on various symbols, because as soon as they attempt to call those
symbols through Epoxy, Epoxy will abort. This means that a bunch of code
needs to be copy-pasted between projects, with the high chance of
somebody getting it wrong.
Epoxy already has all the internals needed to detect whether GLX and EGL
are available, so exposing a simple API is a better alternative.
Fixes #73
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When checking whether GLX or EGL are available on the system, we don't
want to use the internal API that forces an exit() on missing libraries
and symbols — as that would defeat the point.
Instead, we should have safe functions to call internally that simply
return a NULL pointer, so we can bail out ourselves in a controlled
fashion.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, GLX support in libepoxy at build time is hard coded, but
various platforms have expressed their preference for having a
configure-time option for it.
For instance:
- various embedded distributors do not ship with X11, but wish to use
libraries that depend on libepoxy now that Wayland is available
- distributors for macOS still wish to retain the ability to ship
their software with X11 enabled
By default, we want epoxy to build with GLX enabled pretty much
everywhere it makes sense, since it's only a build-time option and it's
not a run-time dependency.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Define PACKED for Visual Studio builds, so that we can try to reduce
our library size for Visual Studio builds. Add a ENDPACKED macro
that is currently defined only for Visual Studio builds as packing is
done via __pragma(pack(push,n), that should be popped when done.
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
tests with CMake. Add support for linking with the static run-time library with MSVC.
|
| |
|
|
| |
Epoxy in Windows.
|
| |
|
|
| |
Update documentation about building static libs and about using OpenGL ES / EGL.
|
| |
|
|
| |
"autogen.sh".
|
| |
|
|
| |
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).
|
| |
|
|
| |
appropriate. Fix tests build errors.
|
| | |
|
| |
|
|
|
|
| |
Since our provider enums are small, we can store them as bytes or
shorts if we just let the compiler know that it's OK. Saves 20kb in
the compiled library.
|
| |
|
|
|
| |
Visual Studio does not like __stdcall before the return type, which is
what GLAPIENTRY and EPOXY_CALLSPEC expands to on Windows.
|
| |\
| |
| |
| |
| |
| | |
I've come around to the various contributors' positions: X11 on OSX is
basically dead, and we're not serving our users by trying to support
it.
|
| | |
| |
| |
| |
| | |
OS X support shouldn't depend on X11 being installed on the host.
Removes the X11 dependency.
|
| |/
|
|
|
|
|
|
| |
This has been tested with both OpenGL and OpenGL ES on Android.
We can't use dlsym on Android to get all the function pointers since Android's libGLES* libraries are just shim libraries that pass everything through
to the real vendor specific libraries.
Due to this we must grab function pointers entirely through eglGetProcAddress instead of dlsym.
|
| |
|
|
| |
MSVC 2010 appears to require that it be located there.
|
| |
|
|
| |
Fixes #11.
|
| |
|
|
| |
I was running into file size limits with win32 debug symbols.
|
| |
|
|
|
|
|
| |
ARM and Mesa disagreed on how to look up the functions, so support
both ways.
Fixes #21
|
| |
|
|
| |
Fixes #19
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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).
|
| |
|
|
|
| |
On non-win32, it was declaring a new function pointer variable on
every #include, and OS X's linker got angry.
|
| |
|
|
|
|
|
|
| |
In addition to the failing testcase, there were a couple of
regressions in piglit's attribs test: one from glBegin_unwrapped vs
glBegin confusion in the __asm__ directives we were generating, and
one where the function pointers apparently were just getting mixed up
at application runtime.
|
| |
|
|
|
| |
It doesn't exist. There's EAGL, but that's not something we're
covering.
|
| |
|
|
| |
This is very poorly tested at this point, but survives a simple testcase.
|
| |
|
|
|
|
| |
This is going to change for macos and win32, and this will be easier
than trying to spread that logic through the python code and into the
generated code.
|
| |
|
|
|
| |
It now builds successfully builds a .dll file. Not that it's usable
or anything yet.
|
| |
|
|
|
|
| |
The dlopen bits are left in place, but the functions required the
types, and in the case of EGL, the types require that the platform
header actually exists.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
I was thinking at one point that part of the build was going to
require not including the #defines from the generated code, but would
want these prototypes. It turns out that's not the case (and if it
is, I'll just wrap the #defines in an ifdef).
|
| | |
|
| |
|
|
|
|
|
| |
Unfortunately, for GLX 1.4+ entrypoints (just glxGetProcAddress
currently) or extensions, if there isn't a context bound then we don't
have a dpy and screen available to provide useful debug messages. Oh
well.
|
| |
|
|
|
|
| |
By having shared code to print the names and a shared table of what
the names are, this reduces the built stripped size of the library by
80k.
|
| | |
|
|
|
Not actually working yet, but it's a snapshot to start from.
|