Vladimír Vondruš
a02e9465d6
Trade: allow retrieving importer data directly by name.
6 years ago
Vladimír Vondruš
0657d6073d
Primitives: MSVC 2015 is this what makes you throw up?
6 years ago
Vladimír Vondruš
b203924355
GCC 4.8, happy to see you're still around, causing problems.
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š
13c071a1aa
GL: allow to construct DynamicAttribute from VertexFormat.
6 years ago
Vladimír Vondruš
ed88b35ec8
Trade: support packed attributes in MeshData.
...
This was a LONG unexpected detour... I mean, I expected it, but not so
soon.
6 years ago
Vladimír Vondruš
84ee4f3cc7
Add packed, half and double types to VertexFormat.
...
Intentionally not enabling / documenting the double types for use with
positions / normals / ... yet. Might come later (or never).
6 years ago
Vladimír Vondruš
274fdc3813
GL: port away from MeshDataXD.
6 years ago
Vladimír Vondruš
53ef991c44
SceneGraph: port away from MeshDataXD.
6 years ago
Vladimír Vondruš
35659a6d15
DebugTools: port away from MeshDataXD.
6 years ago
Vladimír Vondruš
c07af0340f
MeshTools: port tests and benchmarks away from MeshData3D.
6 years ago
Vladimír Vondruš
89d6d6de7c
Shaders: port tests away from MeshDataXD.
6 years ago
Vladimír Vondruš
fa3c9495b7
MeshTools: improve the subdivide benchmark with in-place subdiv.
6 years ago
Vladimír Vondruš
a68946df5b
Primitives: port tests and related tools away from MeshDataXD.
...
Improving the tests a bit for trivial primitives to ensure the attribute
layouts are correct, not just counts.
6 years ago
Vladimír Vondruš
c8de337c06
Primitives: port away from MeshDataXD.
...
The internals don't use any std::vector anymore, only the icosphere
needs an std::unordered_map to do duplicate removal. Additionally, the
most simple primitives are now simply views on constant data,
being completely zero-allocation.
On a Mac this resulted in the dylib going down from 1.5 MB to 418 kB in
Debug, and from 129 kB to 90 kB in Release. Quite nice.
The tests are not ported away from MeshDataXD yet as I want to ensure
the behavior is *exactly* as before.
6 years ago
Vladimír Vondruš
006790969a
Trade, MeshTools: deprecate MeshDataXD and everything that uses it.
6 years ago
Vladimír Vondruš
0f4a5adb4d
Trade: deprecate AbstractImporter interfaces for MeshDataXD.
...
For backwards compatibility these will delegate to the new MeshData
interfaces for 3D (and nothing for 2D, because so far there were no 2D
scene importers).
6 years ago
Vladimír Vondruš
5481581c5e
MeshTools: implement compressIndices() taking a MeshData.
6 years ago
Vladimír Vondruš
16c3480d7f
MeshTools: implement compile() taking a MeshData.
...
Also add new variants that allow for external buffers.
6 years ago
Vladimír Vondruš
e8692af4a6
MeshTools: implement duplicate() taking a MeshData.
6 years ago
Vladimír Vondruš
6c2fb3facb
MeshTools: implement interleave() taking a MeshData.
6 years ago
Vladimír Vondruš
1e85279872
MeshTools: implement interleavedLayout().
...
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
6 years ago
Vladimír Vondruš
3784dea7c9
MeshTools: implement isInterleaved() for Trade::MeshData.
...
Will be used to distinguish if the data need to be repacked or not in
various tools.
6 years ago
Vladimír Vondruš
ccd3d24185
Trade: add (deprecated) implicit conversion of MeshData to MeshDataXD.
6 years ago
Vladimír Vondruš
b016258fdb
Trade: added MeshData::attributeId().
...
Useful for quick localization of named attribs when dealing with
attributeData() (for example in MeshTools).
6 years ago
Vladimír Vondruš
a3c5c0052d
Trade: make MeshData::release*() less brutal, add releaseAttributeData().
...
It only resets count of released thing to zero, not going all nuclear.
Otherwise it wouldn't be possible to release attribute data and then
vertex data as releasing one would wipe the other.
6 years ago
Vladimír Vondruš
270e93e134
Trade: relax index/attribute/vertex count restrictions in MeshData.
...
Allow to make:
- an indexed mesh with zero indices
- a mesh with non-zero attribute count but zero vertices
- a mesh with non-zero vertex count but zero attributes
All of these are valid use cases as explained in the tests, and will
also make the release*() behavior defined better.
6 years ago
Vladimír Vondruš
87d16bc627
Trade: add a convenience MeshData::indexOffset() getter.
6 years ago
Vladimír Vondruš
506740f9c8
Trade: typeless access to MeshData indices.
...
Like with attributes, it returns a 2D strided view with the second
dimension having the same size as the index type.
6 years ago
Vladimír Vondruš
d0542267ac
Trade: direct access to MeshAttributeData array in MeshData.
...
Again useful for MeshTools algos.
6 years ago
Vladimír Vondruš
476497952f
Trade: make it possible to construct a "padding" MeshAttributeData.
...
Will be used in MeshTools algorithms. Also harden the MeshData
constructor to reject such instances.
6 years ago
Vladimír Vondruš
5f35b06d8f
Trade: expose getters in MeshAttributeData.
6 years ago
Vladimír Vondruš
aecec186be
Trade: expose getters in MeshIndexData.
...
It made testing and everything harder than strictly necessary. OTOH
still keeping MeshData as a friend and accessing members directly since
those are heavily interconnected anyway.
6 years ago
Vladimír Vondruš
e3ee1e561e
Trade: typeless access to MeshData attributes.
...
Similarly to ImageData::pixels() which return a strided array view of
one dimension more.
6 years ago
Vladimír Vondruš
036fced749
Trade: whitelist (exported) growable array deleters in imported data.
6 years ago
Vladimír Vondruš
93e6dc2c54
Trade: make AnimationTrackData constructors explicit.
...
There's a ton of parameters and it's just unreadable without.
6 years ago
Vladimír Vondruš
c74b4c6b90
Trade: make MeshAttributeData constexpr.
...
This makes it possible to have fully allocation-less MeshData, with
statically defined indices and attributes. Only the final MeshData
construction needs to be done at runtime because Array is not constexpr,
but that isn't anything heavy anyway.
6 years ago
Vladimír Vondruš
8cd75087ed
Trade: make MeshIndexData constexpr.
...
First step towards an ability to expose data compiled into an executable
through MeshData without having to allocate anything.
6 years ago
Vladimír Vondruš
6ddcc0b1ae
Trade: make it possible to construct AnimationData from track init list.
...
Easier to write. Need to take extra care with default deleters.
6 years ago
Vladimír Vondruš
dd5acdd850
Trade: allow AnimationTrackData be created from a typed track.
...
So users aren't force to specify everything on their own. It makes the
test code a bit less painful. But just a bit.
6 years ago
Vladimír Vondruš
4011e3006d
Trade: allow non-owning aray deleters passed through Importer APIs.
6 years ago
Vladimír Vondruš
6ed0df26c6
Trade: mutable access in ImageData consistent with Animation/MeshData.
6 years ago
Vladimír Vondruš
b71e50b023
Trade: make AnimationData::release() consistent with MeshData.
6 years ago
Vladimír Vondruš
0fd62194c8
Trade: mutable access in AnimationData.
...
Follows the change done in MeshData.
6 years ago
Vladimír Vondruš
a3ab27f7b9
Trade: return TrackView with const types from AnimationData.
...
Follows the change done in 954798a9ba .
6 years ago
Vladimír Vondruš
8ea86b05f9
Trade: implement mutable data access in MeshData.
...
Turns out the design wasn't so simple after all. AnimationData and
ImageData classes will follow with similar changes.
6 years ago
Vladimír Vondruš
fcd38cabc7
Trade: new enum for describing data ownership.
...
Will be used for MeshData that don't own the memory.
6 years ago
Vladimír Vondruš
fb1fdf6105
Trade: implement Importer interfaces for the new MeshData.
...
Deprecating of the old ones comes later.
6 years ago
Vladimír Vondruš
ecbe5718b4
Trade: a reworked MeshData class.
...
With API analogous to the (relatively) new AnimationData -- with one
buffer containing all index data and one buffer containing all vertex
data, both meant to be uploaded as-is to the GPU.
This will eventually replace MeshData2D and MeshData3D, backwards
compatibility and wiring up to other APIs will be done in follow-up
commits.
6 years ago
Vladimír Vondruš
d46061b285
Make MeshPrimitive and MeshIndexType enums only 8bit.
...
Otherwise they take up too much space.
6 years ago