Because We Can. No, actually, this will be used for upcoming material
layers, it's not a bloat. However, this means you can do things like
Trade::MaterialData weDoCssHere{{}, {
{"color", "navy"},
{"highlight", "rgba(35, 255, 78, 0.75)"},
{"dropShadow", "var(--shadow-color)"}
}};
Suited mainly for custom app-specific material properties (e.g., actual
texture pointers and handles), not really planning on using this in
Magnum itself.
AbstractMaterialData is now just a typedef to MaterialData, with all
existing public APIs moved to (and marked as deprecated, if they don't
make sense anymore). The new class doesn't have a virtual destructor as
that's not the desired use anymore -- and AbstractImporter::material()
APIs will be returning an Optional instead of a Pointer, which means any
potential subclasses will be sliced away.
PhongMaterialData is reimplemented using the new key/value store,
with no own members anymore -- thus having the same size as
MaterialData, and safe to be casted from it to access the helper APIs.
Compared to previous AbstractMaterialData, which was always just a
single type, the new data can describe several different materials at
once. This is the case for example with glTF, where a material can be
metallic/roughness but also have an alternative description using
specular/glossiness.
Currently the usage is undocumented, but when everything is in place, if
a material advertises given type, it can be then cast to one of
its convenience subclasses.
Better since it has the same prefix as other texture-related attributes,
such as *TextureMatrix(). Not using *TextureCoordinateSet() because
that's overly long, *TextureSet() is OTOH confusing (and especially so
if we'd introduce *TextureLayer()).
Those would be unfortunately very hard to preserve when switching to the
new MaterialData. These accessors mattered mostly only when populating
the instance (i.e., in importer plugins) so such breakage shouldn't be
too much of a problem for regular users.
It now supports both color+texture (instead of just one or the other)
which made it much simpler to use (and implement as well), also can
reference normal maps and specify texture coordinate transformation now.
The old APIs are depecated, but no tests or other code is updated yet in
order to ensure everything continues to work as before.
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.
Now named MaterialType. It's easier to type this:
auto t = Trade::MaterialType::Phong;
Than this overlong name, which is moreover ambiguous due to subclassing:
auto t = Trade::AbstractMaterialData::Type::Phong;
// or should I use rather Trade::PhongMaterialData::Type::Phong?
Now we can use CORRADE_COMPARE() almost exclusively for comparing
Vector, Matrix instances and all containers from STL. Tests running time
for all 31 tests is now around 0.1 sec instead of two seconds like
before.
Disabled compilation of all benchmarks, because TestSuite cannot handle
them yet.
PKGBUILD from AUR now can shamelessly use check() function without
unnecessary dependencies.
It was overengineered and unnecessarily complicated. Now the camera is
specified only in Scene::draw(), which eliminates all the needs for
recalculating absolute object transformations on each camera
transformation change. Absolute object transformation is now computed
relative to root object or relative to camera object passed as
parameter. Because of that it is now also possible to draw the scene
using multiple cameras at once.