Useful in this case:
std::optional<Platform::Context> context;
context = Platform::Context{};
This was currently possible only with calling context.emplace(), which
in my opinion is confusing and looks like a no-op. Move assignment is
still not allowed, because having two separate state trackers (and
deleting one of them) currently makes no sense.
Full support for EXT_transform_feedback, transform feedback objects
from ARB_transform_feedback2 and equivalent OpenGL ES 3.0 functionality.
Example usage is in src/Magnum/Test/TransformFeedbackGLTest.cpp, I'll
add some example later.
A general way to detect drivers, which can be later used for applying
driver-specific workarounds. Currently used for disabling
ARB_explicit_uniform_location on AMD drivers.
Returns list of _all_ extensions reported by the driver, even those that
are not supported in Magnum and also those that are marked as disabled
due to driver bugs. Usable mostly when doing fresh port to new platform
to discover possible new features.
The actual implementation was part of Context constructor (and now this
function is called instead). It is rather ugly because we need to take
care of both GL 2.1 and GL 3.0 (and also ES2 and ES3).
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.
As we are now using absolute includes, there is no need to prefix
everything with "magnum<Namespace>" etc. All generated configuration
files are renamed to configure.h and their path is included _before_
everything else to avoid accidental collisions.
The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
There will be many places (e.g. all
Platform::*Application::Configuration classes) where Version will be
used without Context (and all GL stuff brought with it).