Functionality provided by GL 3.3 and ARB_instanced_arrays, on ES2 this
is again implemented in three different extensions --
{ANGLE,EXT,NV}_instanced_arrays. They are disabled until Magnum has
proper extension loading on ES.
On desktop GL this is provided by ARB_draw_instanced (GL 3.1). Base
instance is available only on desktop GL (4.2, ARB_base_instance). In
ES2 the instanced functionality is provided by three (!) different
extensions (ANGLE_instanced_arrays, EXT_draw_instanced,
NV_draw_instanced), the proper implementation is chosen on context
creation based on what extension is available. Though we don't have
extension loader for ES yet, thus all these extensions are disabled and
the implementation has assertion in it.
Added blind test which tests only that something has been drawn and no
errors were emitted, but not whether the right command is used. I'll
probably need to check this later, because the Mesh::draw() behemoth is
going slightly out of hand :)
Until we have proper extension loader implemented (caused
FramebufferGLTest to assert).
On a related note, NVidia drivers 334.21 support *a lot* of ES2
extensions. Wow.
Previously the extensions were either disabled altogether (e.g. because
we don't have yet extension wrangler on ES) or had manually adjusted
minimal required versions to avoid issues on older versions (e.g.
ARB_explicit_attrib_location is known to give compiler errors when used
with GLSL < 1.50 on some drivers), both done basically at compile time
unrelated to actual hardware/driver used.
Now all the extensions are enabled exactly as the driver advertises them
(or when their core version is not larger than the context version) and
have minimal required versions as per specification. Given extension is
supported in given version when it is marked as such and its minimal
required version is not larger than the requested one. The extension
disabling is thus done by simply increasing the minimal required version
to larger value (or Version::None for disabling it for all versions).
Currently no such disabling is put into place, but the existing
workarounds scattered all over the place will be gradually converted to
this.
Simplified the code and tests by marking all extensions from previous
versions as supported instead of additional "shorthand" checking whether
extension's core version is supported. The check wasn't probably much of
a speedup, as it was just another branch. This was also buggy
previously, because when the extension would be reported as not being
supported in older versions, which is not what we want. Hopefully this
won't reintroduce the numerous issues with Mesa and OSX I had in the
past :-)
Also removed duplicate implementation of
Context::isExtensionSupported(), one overload is now calling the other.