This fixes crashes on ARM's Mali drivers, where desktop GL isn't
supported, and epoxy didn't notice the error and tried to dlsym() on
libGL.so.1.
An alternative would have been to look at the response from
eglQueryAPI() first, but that would have meant that we still need to
BindAPI in the case that eglQueryAPI returns something like VG or CL,
and so we needed to handle these errors regardless.
Fixes#22
Epoxy dlsym()s directly into libEGL instead of using dlsym() on a NULL
handle, so we can't relying on ELF resolution like we do for dlopen().
Instead, just override epoxy's function pointers for the functions
epoxy will call in the process of getting one of these bootstrap
functions.
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?
One of the problems with krhplatform.h (besides it being a terrible
idea in the first place) is that it's not present on many systems at
all, including apple, win32, and linux before late 2009.
So, unless we introduce the first ./configure dependency to the core
library build, we really do need to define these standard types to
their standard values. But if we allow khrplatform.h inclusion as
well, we'll get long-vs-int redefinition warnings on 32-bit. So, we
have to completely replicate the header, which is a thing we've done
for everything else except for eglplatform.h.
A testcase will be used to make sure that our types don't drift from
the system khrplatform.h types, if it even exists.
Fixes#17
This is a lot shorter to type, and still gets the dependencies to work
(tested with touch src/dispatch_common.c; make check, and touch
src/egl_common.c; make check).
If you happened to do both GLES2 and GLES1 in a process, it meant that
you'd try to look up v1 procs in the v2 API, and lose. Caught by
piglit oes_fixed_point-attribute-arrays.
The new linker requires that the consumers of a library link against
the libraries that that library depends on, which is supported by
Libs.private.
Fixes#16
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
It's been 0x000fffff on Mesa since the initial import in 1999. It's
the same value on my OS X 10.8 system, mingw's Windows-compatible
gl.h, and a copy of the windows SDK gl.h I found laying around on the
internet.
Fixes piglit ARB_multisample/pushpop.
EGL_KHR_image_base defines these two functions, and so does
EGL_KHR_image (which is bascically the union of EGL_KHR_image_base and
EGL_KHR_image_pixmap).
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.