diff --git a/doc/changelog.dox b/doc/changelog.dox index a49085b51..69c4ec781 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -366,6 +366,11 @@ See also: @ref Trade::PhongMaterialData::commonTextureCoordinates() exposing a common texture coordinate set as a complement to a per-texture property 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` option for converting images in-place diff --git a/src/Magnum/Trade/TextureData.cpp b/src/Magnum/Trade/TextureData.cpp index 905343394..cc07e20e4 100644 --- a/src/Magnum/Trade/TextureData.cpp +++ b/src/Magnum/Trade/TextureData.cpp @@ -35,9 +35,12 @@ Debug& operator<<(Debug& debug, const TextureType value) { /* LCOV_EXCL_START */ #define _c(value) case TextureType::value: return debug << "::" #value; _c(Texture1D) + _c(Texture1DArray) _c(Texture2D) + _c(Texture2DArray) _c(Texture3D) _c(CubeMap) + _c(CubeMapArray) #undef _c /* LCOV_EXCL_STOP */ } diff --git a/src/Magnum/Trade/TextureData.h b/src/Magnum/Trade/TextureData.h index fb025fa01..3364f035c 100644 --- a/src/Magnum/Trade/TextureData.h +++ b/src/Magnum/Trade/TextureData.h @@ -53,12 +53,26 @@ enum class TextureType: UnsignedByte { */ 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 * an image from @ref AbstractImporter::image2D(). */ 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 * to an image from @ref AbstractImporter::image3D(). @@ -73,6 +87,15 @@ enum class TextureType: UnsignedByte { */ 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 /** * Cube map texture.