Version query. Such a simple and obvious thing and because they forgot
to add such function to Vulkan 1.0, the only three possible ways to
retrieve a version retrieval function are:
1. with a static constructor that could make a library crash even before
main() is reached if the driver is *extra* shitty
2. with a init() function that would cause race conditions if ever
called from multiple threads (which of course can happen because you
need to know instance version in order to use the correct function
pointers and route pNext fields)
3. with a init() function that internally uses std::mutexes and
std::call_once and <functional> and atomics and whatnot and thus
takes longer to compile than the rest of the engine
Approach 2 chosen originally but the race condition countermeasures
turned out to be extra annoying to use, so switched to approach 1 now.
On desktop this saves about 50 kB in symbols. Was done for Vulkan
already, this follows that (two years later). I need this in order to
solve the problem of static globals being unique across shared libs, and
it sounded better to export just one symbol instead of 689.
ARB_sample_locations and AMD_shader_explicit_vertex_parameter /
NV_fragment_shader_barycentric for barycentic coords in the vertex
shader. The ARB extension mentions GLES but doesn't have any assigned
number, so I'm treating it as desktop-only. There's a NV variant that
does have an ES extension number, but I don't really want to add it just
because that.
There's a new firefox-fake-disjoint-timer-query-webgl2 workaround and a
half-page of text listing various caveats and issues you might run into.
Also exposing them in the OpenGLTester (although quite shitty at this
point).
GL has an extension, but only for ES, not on desktop. Vulkan has
nothing yet (due to there being just ARM that implements it, no other
vendor), except those being listed in a KTX format specification.
Those are now also available under WebGL 1/2 and OpenGL ES 3.O (strangely
not OpenGL ES 2.0) under EXT_texture_compression_{rgtc,bptc}. The GL names
are extra weird-ass now that all other APIs use the BC names.
This fixes a conflicting definition of GLsizeiptr and GLintptr when
Magnum is combined with qopengl.h from Qt on Windows. Khronos has it as
`signed long int`, whereas qopengl.h as ptrdiff_t, which is just `int`.
This one explicitly loads GL 1.0 and 1.0 function pointers on EGL
contexts on NVidia drivers (Linux headless boxes), because somehow the
usual statically linked functions don't behave correctly.