Vladimír Vondruš
dec7904db1
MeshTools: removeDuplicatesIndexedInPlace() for type-erased indices.
...
Next step is a variant operating directly on a MeshData.
6 years ago
Vladimír Vondruš
7205bcf28c
MeshTools: this actually didn't test the erased version at all.
...
The heck was I doing when implementing these.
6 years ago
Vladimír Vondruš
b180dd7bf0
MeshTools: various cleanup.
6 years ago
Vladimír Vondruš
e9a574f948
MeshTools: why am I discovering all those weird things today.
6 years ago
Vladimír Vondruš
a6302ac7d3
MeshTools: test asserts in type-erased flipFaceWinding().
6 years ago
Vladimír Vondruš
749ae985b1
sceneconverter: support chaining converters.
6 years ago
Vladimír Vondruš
fb32dd4c0e
imageconverter,sceneconverter: support option subgroups as well.
6 years ago
Vladimír Vondruš
0da8f89055
sceneconverter: hook scene converter plugins into this thing.
6 years ago
Vladimír Vondruš
08a51215b6
sceneconverter: add a --profile option.
6 years ago
Vladimír Vondruš
b7edd8df25
sceneconverter: move the utility from Trade to MeshTools.
...
So it can make use of all the APIs in here. Having the utility part of
Trade would make the cyclic dependency a bit weird. Not adding MeshTools
as a dependency just yet, will do that once it's actually needed.
6 years ago
William JCM
8a42c727c1
Fix one particular kind of linker errors on MingGW Clang.
...
The existing ifdefs apparently were just to work around something in
MinGW GCC. MSVC, Clang-cl and MinGW Clang don't need these.
6 years ago
Vladimír Vondruš
5f7f219d75
MeshTools: added interleavedMutableData().
...
Needed a mutable variant of interleavedData() without having to do a
const_cast.
6 years ago
Vladimír Vondruš
86a5a63af9
Test: most tests now pass on Zink as well.
...
Just adding a bunch of extension checks that I thought I would never
need again.
6 years ago
Vladimír Vondruš
97e3e2a8fe
MeshTools,Shaders: make the rendering tests pass on llvmpipe.
6 years ago
Vladimír Vondruš
597ed03a65
MeshTools: reduce unwanted variability in the test.
...
It should fail just on the assert we expect, not on something else also.
6 years ago
Vladimír Vondruš
65a2ced2a7
Make this compile and test cleanly with CORRADE_NO_ASSERT defined.
6 years ago
Vladimír Vondruš
d3f2235759
Adapted to Corrade changes.
6 years ago
Vladimír Vondruš
d32fcecf68
MeshTools: fix self-contradictory docs.
6 years ago
Vladimír Vondruš
d569ad2e78
MeshTools: combineFaceAttributes() overload with direct attributes.
...
Needed to add a per-face attribute to an existing mesh in a test and
this seemed like a good idea to have available in general.
6 years ago
Vladimír Vondruš
11df186a44
MeshTools: support an extreme corner case in interleavedData().
...
I need this for combineFaceAttributes() internals, I don't expect this
to be useful for actual humans.
6 years ago
Vladimír Vondruš
ea3bcb6d93
MeshTools: handle the ObjectId attribute in compile().
...
And that's the last warning fixed.
6 years ago
Vladimír Vondruš
a7a0acd3a4
MeshTools: add a primitiveCount() utility.
...
I need it in magnum-player.
6 years ago
Vladimír Vondruš
80c6fef7bf
MeshTools: handle generic Tangent and Bitangent attributes in compile().
...
A bit unfortunate that the test needs ES3.2 and GS, but I got nothing
better right now. Not handling ObjectId yet, for that I need to
implement instancing first (so yes, GCC/Clang will still warn about an
unhandled switch case).
6 years ago
Vladimír Vondruš
37373aaf35
MeshTools: minor.
6 years ago
Vladimír Vondruš
c5e70c40eb
MeshTools: ensure proper assert is printed in compressIndices().
6 years ago
Vladimír Vondruš
b785a8ac69
MeshTools: generateIndices() operating directly on a MeshData.
6 years ago
Vladimír Vondruš
b57a9f1027
MeshTools: tools for generating index buffers out of various primitives.
6 years ago
Vladimír Vondruš
de9c289328
Adapted all code and doc snippets to GL library changes.
6 years ago
Vladimír Vondruš
0e2a5cce37
MeshTools: fix a compiler warning.
6 years ago
Vladimír Vondruš
236954ad16
CMake: MeshTools now depends on Trade unconditionally.
...
Isn't it great when I discover this five minutes before merging to
master?
6 years ago
Vladimír Vondruš
a4bf0e61a1
MeshTools: option to disable unknown attribute warnings in compile().
6 years ago
Vladimír Vondruš
715f6114de
MeshTools: reorder code.
...
No functional change.
6 years ago
Vladimír Vondruš
393ba7a088
MeshTools: implemented concatenate() and concatenateInto().
6 years ago
Vladimír Vondruš
7857388949
MeshTools: implemented combineFaceAttributes().
6 years ago
Vladimír Vondruš
9a6ef0a220
MeshTools: new interleavedData() utility.
6 years ago
Vladimír Vondruš
27f6cc309d
Trade: allow specifying explicit vertex count on MeshData construction.
...
Until now, except for an attribute-less index-less mesh, the vertex
count was only implicitly taken from passed attributes, but it was
severely limiting:
- There was no way to set vertex count for an attribute-less
indexed mesh, which didn't make sense
- All code that made non-owning MeshData instances referencing another
MeshData had to explicitly handle the attribute-less corner case to
avoid vertex count getting lost
- Offset-only attributes couldn't be used to specify static layout of
meshes with dynamic vertex count, causing unnecessary extra
allocations especially in the Primitives library.
6 years ago
Vladimír Vondruš
7a9c630599
MeshTools: add interleavedLayout() that can reuse the attribute array.
6 years ago
Vladimír Vondruš
8c4a2b1c6f
Trade: add getters for offset and stride in MeshAttributeData.
...
Less code and complexity than first creating a StridedArrayView in
data() and then extracting offset/stride from there.
6 years ago
Vladimír Vondruš
96368b9e81
MeshTools: doc++
6 years ago
Vladimír Vondruš
e30d9de7af
MeshTools: ensure a corner case in interleave() is tested as well.
6 years ago
Vladimír Vondruš
12044b8c4d
MeshTools: add type-erased flipNormals() and flipFaceWinding().
6 years ago
Vladimír Vondruš
8a6cceab6c
MeshTools: added removeDuplicates() / removeDuplicatesInto().
...
Those work without modifying the input data. The *Indexed and fuzzy
variants are missing as I don't need those right now, but might get
added later.
6 years ago
Vladimír Vondruš
ec02341c84
MeshTools: deprecate remaining STL-ridden APIs.
...
The combineIndexArrays() and combineIndexedArrays() API is replaced with
a more generic combineIndexedAttributes(), and thanks to that we also
don't need STL-based duplicate() and removeDuplicates().
6 years ago
Vladimír Vondruš
ec739c19ca
MeshTools: implemented combineIndexedAttributes().
...
Replaces the STL-heavy combineIndexedArrays(), but in a less extremely
horrendous way.
6 years ago
Vladimír Vondruš
8f5639e385
MeshTools: added removeDuplicatesInPlaceInto().
...
I need to put the resulting index array into a pre-existing allocation.
6 years ago
Vladimír Vondruš
a3bb6ba4c5
MeshTools: explicitly handle unavailable attribute types in compile().
6 years ago
Vladimír Vondruš
47695f0978
Trade: support offset-only MeshAttributeData.
...
Originally this was done in order to make handling of deserialized data
much simpler (as for those attributes also need to only contain an
offset into some unknown data array), but seems this could be very
useful elsewhere as well -- for example when the layout is known
beforehand but the actual data not yet -- such as in the Line and
Gradient primitives (going to switch them to this in the next commit).
What still unfortunately has to be known in advance is the actual vertex
count (as supplying it directly to MeshData would mean adding 6 new
constructor overloads, and there's enough of those already). Might
revisit later.
6 years ago
Vladimír Vondruš
ee06eb2093
MeshTools: support the 40 new attribute formats by deleting some code.
...
Hur hur.
6 years ago
Vladimír Vondruš
c07af0340f
MeshTools: port tests and benchmarks away from MeshData3D.
6 years ago
Vladimír Vondruš
fa3c9495b7
MeshTools: improve the subdivide benchmark with in-place subdiv.
6 years ago