This only generates code that will be never executed. Tested with Flat
and Phong, the other shaders don't have rendering tests yet but since
the change is the same, I assume it will work there as well.
What's left is *a lot* of places taking monstrous
std::vector<std::reference_wrapper> and that can't be changed to
std::vector<Containers::Reference> in a source-compatible way. Even that
would be only a temporary change, since the goal is to fully avoid
dependency on STL in those cases.
The final version of these APIs should take
Containers::ArrayView<Containers::Reference> and be implicitly
convertible froom e.g. std::vector<Containers::Reference>. That's
definitely possible, but not in time for 2019.01, so instead of forcing
users to temporary pass a `{vec.begin(), vec.size()}` everywhere instead
of just `vec`, I'm rather keeping these APIs intact.
DetectedDriver::AMD is now DetectedDriver::Amd,
DetectedDriver::ProbablyAngle is now just DetectedDriver::Angle. The old
names are still present, but deprecated and will be removed in the
future.
103% of use cases use the returned value directly without checking, so
we might as well do the check ourselves. Added new function hasCurrent()
and added deprecated backward-compatibility conversion and -> operators.
Wow, that creeped to a lot of places.
Last dinosaur from the pointer age.
Please note that in ES3 there is a behavioral change -- geometry shader
is no longer explicitly disabled, but it is enabled by default and you
have to disable it if you don't have the required extension or don't
want to use it.
Each class/function that needs to access the resources first checks
whether the group exists and the group is registered if not. Thus there
is now no difference and annoying special cases when using static build.
WebGL mandates that array subscription is done with constant expression,
ANGLE too (but I think that has also something to do with D3D9
limitations). This is however allowed by OpenGL ES 2.0 specification, so
enabling the workaround only for WebGL and ANGLE (i.e., this won't apply
to Native Client using native GL drivers).
Compiling fragment and vertex shader simultaenously, at least. Nothing
more can be done for now.
Also removed weird duplicate compile/link calls from MeshVisualizer,
went unnoticed since b9a72bd3d1. Why did I
do that?!
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.
The geometry shader implementation somehow expects GLSL 1.50 and is not
working on GLSL 1.40 (probably inconsistent variable naming in
extension and core specification). Added checks for that. Might fix this
properly someday when there is need for geometry shader in GL 3.1.
Inspired in STL, base templated class is renamed to BasicColor{3,4} and
typedef'd with Float type to Color{3, 4}. It is much nicer to write
this:
Color3(1.0f)
Color3::fromHSV(25.0_degf, 0.5f, 0.9f);
instead of this:
Color3<>(1.0f);
Color3<>::fromHSV(25.0_degf, 0.5f, 0.9f);
Removed unneeded member variables, removed wrong assertions and wrong
documentation (most of the state they were fobidding is actually valid).
Retrieving shader log with full length, properly printing non-error
messages to debug output.
Each shader must now be compiled explicitly using compile(), which is
slightly better for the user as it is possible to check compile status
instead of having it weirdly hidden inside attachShader(). link() now
also returns linking status.
Rudely written to work only with fairly recent extensions and nothing
less than GLSL 3.30. It requires geometry shaders for wireframe
rendering, without it it behaves the same as Shaders::Flat.