Browse Source

[wip] Trade: un-combinatorially-explode ImageConverterFeatures.

Unlike most other options, where a plugin can support 3D but not 2D or
compressed but not uncompressed data, the "levels" option is orthogonal
to the rest -- if a format supports multi-level data, it obviously also
supports a case where there is just a single level, and if it supports
multi-level images, then it likely supports them for 1D, 2D and 3D, not
just some.

The bit pattern actually followed this reasoning already, but for some
reason I still went ahead and stamped out all possible combinations.

TODO: finish
TODO: OTOH, the ToData is probably better to not have a single bit
  common for all, as it makes it impossible to say that e.g. 3D is just
  ToFile and 2D and 1D is ToData as well (e.g. when the 3D slices would
  need multiple files). So change that to different bits instead.
sceneconverter
Vladimír Vondruš 4 years ago
parent
commit
4046e75cca
  1. 4
      src/Magnum/Trade/AbstractImageConverter.h

4
src/Magnum/Trade/AbstractImageConverter.h

@ -241,6 +241,9 @@ enum class ImageConverterFeature: UnsignedInt {
*/
ConvertCompressed3DToData = ConvertCompressed3DToFile|(1 << 13),
// Levels = 1 << 14,
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* Convert a set of 1D image levels to a file with
* @ref AbstractImageConverter::convertToFile(Containers::ArrayView<const ImageView1D>, Containers::StringView).
@ -348,6 +351,7 @@ enum class ImageConverterFeature: UnsignedInt {
* @m_since_latest
*/
ConvertCompressedLevels3DToData = ConvertCompressedLevels3DToFile|ConvertCompressed3DToData|(1 << 14)
#endif
};
/**

Loading…
Cancel
Save