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š
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š
dfacd7fb2d
Trade: support mip levels in image import.
...
There's a new level option in each imageND() API, plus an
imageNDLevelCount() query to get image level count.
6 years ago
Vladimír Vondruš
19dd7a0176
Move Feature[s] enums from inside plugin classes outside.
...
Too annoyingly long to type. Also added a debug output operator for the
FontConverterFeature enums, for some reason there were none.
6 years ago
Vladimír Vondruš
fc0ceac99e
Fix dependency of Image headers on StridedArrayView.
6 years ago
Vladimír Vondruš
cd7d080fbd
Test that there is no dependency of Image headers on StridedArrayView.
...
Well. BOOM.
6 years ago
Vladimír Vondruš
86c589d44a
Shorten assertion messages in Image{Data,View,} constructors.
6 years ago
Vladimír Vondruš
44458f5b37
Trade: explanatory message in a test.
7 years ago
Vladimír Vondruš
7be062a71a
Trade: clean up unused & harmful error redirection in tests.
...
Copypaste error. This would hide graceful assert messages, which is not
good.
7 years ago
Vladimír Vondruš
9ea46261ad
Trade: test that all *Data move constructors/assignments are noexcept.
7 years ago
Vladimír Vondruš
22458f22b5
Trade: minor cleanup.
7 years ago
Vladimír Vondruš
84fc685c87
Trade, Audio: explicitly disallow custom deleters returned from plugins.
7 years ago
Vladimír Vondruš
387a12c329
Trade: provide less useless OOB assert messages.
...
If this would be there yesterday already, it would made my debugging
session of `image2D(-1)` immediately obvious (instead of wasting 20
minutes).
7 years ago
Vladimír Vondruš
a035220552
Trade: this was not needed.
...
And made some valid asserts too silent to be heard.
7 years ago
Vladimír Vondruš
71a9f1bbbf
Reserve zero [Compressed]PixelFormat for an invalid value.
...
Catches accidents better -- just look at the diff. Might catch accidents
in your code now as well, so beware!
7 years ago
Vladimír Vondruš
069c81b9cb
Deprecate passing nullptr to images.
...
Causes too much pain. Ugh.
7 years ago
Vladimír Vondruš
93789721b2
De-inline Image headers, remove dependency on ImageView.
...
This means users have to add some more #includes on their side. Sorry
but it's for your own good :P
7 years ago
Vladimír Vondruš
41b975cb69
New Mutable[Compressed]ImageView types for non-const image data views.
7 years ago
Vladimír Vondruš
3d5f7b9a3c
Make r-value [Compressed]Image[Data]::data() return an Array.
...
Instead of them being deleted. This was not possible in the times where
GCC 4.7 compatibility was a thing, but now that's long gone.
And of course I forgot the l/r-value overloads on CompressedImage :/
7 years ago
Vladimír Vondruš
e3eebd34b7
Add templated Image{,View,Data}::pixels().
...
It's potentially dangerous because the user is responsible for choosing
a correct type, on the other hand forcing them to do it verbosely
through arrayCast() is both too annoying and too hard to explain.
7 years ago
Vladimír Vondruš
e5175583a7
Added Image::pixels(), ImageView::pixels() and Trade::ImageData::pixels().
...
Hard to explain in a tweet, err, commit message. Blog post incoming.
7 years ago
Vladimír Vondruš
fb930187c1
Animation: adapt to Corrade changes.
7 years ago
Vladimír Vondruš
3626562e1d
Adapted to Corrade changes.
...
Mostly missing includes now.
7 years ago
Vladimír Vondruš
589a912fa1
Trade: accept const references in AbstractImporter file callbacks.
7 years ago