The loader now doesn't attempt to check for extensions and just loads the
function pointers. It was doing that for all core functions anyway, so a
few more DSA functions won't hurt the loading times too much. Should fix
issues with core-only contexts on OSX.
Caused linker problems mainly on Windows, where every symbol would need
to be exported manually, on Linux this was done implicitly (or with
`-fvisibility=default`). I now maintain glLoadGen fork at
https://github.com/mosra/glloadgen.git containing changes needed for
Magnum.
The `ogl_*()` functions are used only internally, various global
variables for extension queries are not used at all and thus they don't
need to be exported. I thus enabled `-fvisibility=hidden`.
Fixes#16.
Removed all known GLEW workarounds, added one small workaround for
missing ARB_texture_compression_bptc. I didn't want to patch glLoadGen
for just four enum values, this way it's possible to use stock one
without any patching (except for missing OpenGL 2.1 support, as stated
in external/OpenGL/GL/README.md).
As one file now replaces both `glew.h` and `glcorearb.h` and it has the
same size as `glcorearb.h` alone , it saves approximately 18k LOC,
resulting in 15 second shorter compilation time (5:03 before, 4:48 now).
Not bad.
Headers gl2.h and gl2ext.h shipped with NaCl are different to the
official ones, which is causing linker issues, thus using NaCl's own
gl2.h. They are otherwise similar, thus it should cause no compatibility
issues.
On the other hand, gl2ext.h shipped with NaCl is slightly outdated with
some recent extensions missing. We are including the NaCl's one and then
the official one over it (undefining the include guard). The symbols are
guarded also by extensions, so it should cause no conflicts.
Moved them to `OpenGL/` subdirectory, allowing them to be included
explicitly with e.g. <OpenGL/GLES2/gl2ext.h> overriding the system
<GLES2/gl2ext.h> header. Our versions of the headers are thus now
explicitly included in `OpenGL.h`, but they can be also included using
no-prefix path if no system version is available. It might break some ES
platforms, they will be fixed when found.
The headers are now installed into `Magnum/OpenGL` (not into any
artificial `external` directory). Now also installing GLES2 headers for
OpenGL ES 2 (previously ES3 headers were installed for both ES2 and
ES3).