Browse Source

Trade: add TextureType::Texture1DArray, Texture2DArray and CubeMapArray.

pull/529/head
Vladimír Vondruš 5 years ago
parent
commit
4c4b259676
  1. 5
      doc/changelog.dox
  2. 3
      src/Magnum/Trade/TextureData.cpp
  3. 23
      src/Magnum/Trade/TextureData.h

5
doc/changelog.dox

@ -366,6 +366,11 @@ See also:
@ref Trade::PhongMaterialData::commonTextureCoordinates() exposing a @ref Trade::PhongMaterialData::commonTextureCoordinates() exposing a
common texture coordinate set as a complement to a per-texture property common texture coordinate set as a complement to a per-texture property
added in 2020.06 added in 2020.06
- Added @ref Trade::TextureType::Texture1DArray,
@relativeref{Trade::TextureType,Texture2DArray} and
@relativeref{Trade::TextureType,CubeMapArray} in order to be able to
distinguish what's the intended texture use, e.g. whether it's a 3D texture
with filtering along Z or if it's a 2D array with discrete slices.
- @ref magnum-imageconverter "magnum-imageconverter" has a new `--in-place` - @ref magnum-imageconverter "magnum-imageconverter" has a new `--in-place`
option for converting images in-place option for converting images in-place

3
src/Magnum/Trade/TextureData.cpp

@ -35,9 +35,12 @@ Debug& operator<<(Debug& debug, const TextureType value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case TextureType::value: return debug << "::" #value; #define _c(value) case TextureType::value: return debug << "::" #value;
_c(Texture1D) _c(Texture1D)
_c(Texture1DArray)
_c(Texture2D) _c(Texture2D)
_c(Texture2DArray)
_c(Texture3D) _c(Texture3D)
_c(CubeMap) _c(CubeMap)
_c(CubeMapArray)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }

23
src/Magnum/Trade/TextureData.h

@ -53,12 +53,26 @@ enum class TextureType: UnsignedByte {
*/ */
Texture1D, Texture1D,
/**
* One-dimensional texture array. The @ref TextureData::image() ID
* corresponds to an image from @ref AbstractImporter::image2D().
* @m_since_latest
*/
Texture1DArray,
/** /**
* Two-dimensional texture. The @ref TextureData::image() ID corresponds to * Two-dimensional texture. The @ref TextureData::image() ID corresponds to
* an image from @ref AbstractImporter::image2D(). * an image from @ref AbstractImporter::image2D().
*/ */
Texture2D, Texture2D,
/**
* Two-dimensional texture array. The @ref TextureData::image() ID
* corresponds to an image from @ref AbstractImporter::image3D().
* @m_since_latest
*/
Texture2DArray,
/** /**
* Three-dimensional texture. The @ref TextureData::image() ID corresponds * Three-dimensional texture. The @ref TextureData::image() ID corresponds
* to an image from @ref AbstractImporter::image3D(). * to an image from @ref AbstractImporter::image3D().
@ -73,6 +87,15 @@ enum class TextureType: UnsignedByte {
*/ */
CubeMap, CubeMap,
/**
* Cube map texture array. The @ref TextureData::image() ID
* corresponds to an image from @ref AbstractImporter::image3D(), which is
* assumed to have the layer count divisible by 6, each set in order +X,
* -X, +Y, -Y, +Z, -Z.
* @m_since_latest
*/
CubeMapArray,
#ifdef MAGNUM_BUILD_DEPRECATED #ifdef MAGNUM_BUILD_DEPRECATED
/** /**
* Cube map texture. * Cube map texture.

Loading…
Cancel
Save