It is possible to do everything with Mesh::addInterleavedVertexBuffer().
Moreover Mesh::addVertexBuffer() was dependent on vertex count, which
was counterintuitive and not always what the user wants. Also in many
times I mistakenly used Mesh::addVertexBuffer() instead of
Mesh::addInterleavedVertexBuffer() and then spent endless hours trying
to figure out what is wrong. This is now over. Thanks, brain!
Every circle should consist of 40 lines, i.e. sphere should have 40
segments and 20 rings, capsule should have 40 segments and 10 rings per
hemisphere (=20 rings total).
The code is mostly copied and simplified from Capsule renderer. However,
it is such simplification that any attempt to reduce duplicate code
would result in much less maintainable thing.
In most cases just adapted to changes in root namespace and SceneGraph.
ForceRenderer now takes const reference to force vector and additionally
disallows passing rvalue to it.
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
The access methods assert that the user is querying only available data.
Also updated Primitives implementation to create MeshData when
everything is done, not creating empty MeshData and then shooting the
data through interface intended for end users.
Now using const reference to the shape instead of non-const one, also
removed some duplicated code and unneeded includes from the switch,
these operations are done in renderer implementations themselves.
As there is no Magnum::TypeTraits struct anymore, there is no need to
have redundant name in it. Hopefully Doxygen will handle the difference
between this and Corrade's TypeTraits.h properly.
All rendering code computed the transformation/projection matrix the
same way, resulting in redundant calculations. Also the
`transformationMatrix` parameter of internal draw() function was never
used.
* Added missing forward declarations.
* Added getters and setters to ShapeRendererOptions class.
* Cube primitive is indexed, modified the mesh creation accordingly. It
now uses MeshTools, link the library to DebugTools.
* Simplified resource handling so it's now handled in one place. It
still needs to be thought out better.