No issue on GCC, only Clang and MSVC started failing once I renamed the
shaders. These four are the only that don't have the export macro
attached AND YET it somehow worked without any problem until now.
Except MeshVisualizer and VertexColor, which don't have any texturing,
so there it's not needed. In most cases the tests are reusing existing
ground truth files and only modifying transformations / flipping images.
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.
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.
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.
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.
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.
The methods return reference instead of pointer, as the class is
commonly created on the stack. Removed static functions
Shader::fromFile() and Shader::fromData(), as they are not needed now.
Also asserting that the file exists and is readable in addFile().