These are in most cases the only strings that are used, and I don't
think having to call std::strlen() for each of them is a good idea if
we don't need to.
We're going to eventually include this class in all Application classes
(need that in order to inherit a to-be-created Configuration class) and
the <string> and <vector> would be just too much. This change caused
magnum-gl-info.wasm (WebGL 2 build) to go down from 247 to 245 kB. Not
much, but that's I guess because there's still a lot other vectors of
strings elsewhere.
There's a lot more places to clean up, will do those in separate
commits. This change is the most atomic I could do, and it introduces a
breaking change to all APIs that returned a std::vector or a
std::string. Fortunately (or as I hope) those weren't used that much, so
it shouldn't cause build breakages for that many people.
Quite a lot of the optimization ideas is borrowed from the new Vk
library -- such as "interning" the driver workaround strings to avoid
allocating their copies.
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.
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.
The function pointer loading is now moved to Application classes to make
it possible to decide about platform-specific API at usage time, not at
library compilation time.
Currently it's not possible to create the Magnum context any other way
than through Application classes, will solve that in next commits.