This was originally meant to be an interleave() that operates on
MeshData, but later I realized I need the same logic in duplicate(), so
turned it into a private function. Now I am pretty sure I'll be using
this function in *many* importer plugins :D
The point of this change is to allow greater flexibility and reduce
confusion.
When instanced meshes are implemented, MeshTools::interleave() can be
used for creating interleaved buffers with per-instance data and then
the call to Mesh::setCount() will be harmful and/or confusing, becuase
the user would in fact want to call Mesh::setInstanceCount() instead.
Similarly, MeshTools::compressIndices() can be used to create index
buffer for more than one mesh.
GL 4.4 has ARB_buffer_storage, which (in relatively distant future) will
mean that the current way of Buffer::setData() will be deprecated in
favor of Buffer::setStorage(), similarly as Texture::setStorage()
replaced Texture::setImage(). Thus any function which calls
Buffer::setData() internally is not future-proof.
The old MeshTools::compressIndices() and MeshTools::interleave()
overloads are marked as deprecated and will be removed in future
release.
Basically a version of interleave() which takes existing buffer instead
of creating new zero-initialized one. The last bit needed for real
runtime usage.
Everything are now pure functions, no shared state, no useless functor
class wrapping. Still needed to wrap attribute count and stride
computation functions in struct to make proper overload resolution
working without the need to deinline the functions (they have cyclic
dependencies).
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.
We have std::memset for that. What the hell I was thinking back then.
Found when trying to get rid of as many naked allocations and deletions
as possible. Also improved the test with some ASCII-art documentation.
Print expected and actual count to simplify debugging. Also the phrase
"nothing done." is useless, as nothing is _ever_ done after assertion
failure. Probably remains from the times where that wasn't assertion but
merely harmless warning.
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.
All classes moved to MeshTools::Implementation namespace and removed
from Doxygen output. They now all return tuples instead of custom
structures. Updated and improved documentation, removed references to
implementation classes.