From dbbf33a61bd4475399d4b7977a6c879c3fc9081d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 24 Jun 2022 15:27:35 +0200 Subject: [PATCH] Add a note why "placeholder" Image constructor have no ImageFlags. So far I don't see a case where any current or upcoming ImageFlags could be used to affect how GL downloads the image. --- src/Magnum/Image.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index d4074456e..93371cea1 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -157,6 +157,8 @@ template class Image { * layout flags are empty. Move over a non-empty instance to make it * useful. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ /*implicit*/ Image(PixelStorage storage, PixelFormat format) noexcept; /** @@ -166,6 +168,8 @@ template class Image { * Equivalent to calling @ref Image(PixelStorage, PixelFormat) * with default-constructed @ref PixelStorage. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ /*implicit*/ Image(PixelFormat format) noexcept: Image{{}, format} {} /** @@ -212,6 +216,8 @@ template class Image { * pixel size directly. Uses @ref pixelFormatWrap() internally to wrap * @p format in @ref PixelFormat. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ explicit Image(PixelStorage storage, UnsignedInt format, UnsignedInt formatExtra, UnsignedInt pixelSize) noexcept; /** @overload @@ -219,6 +225,8 @@ template class Image { * Equivalent to the above for @p format already wrapped with * @ref pixelFormatWrap(). */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ explicit Image(PixelStorage storage, PixelFormat format, UnsignedInt formatExtra, UnsignedInt pixelSize) noexcept; /** @@ -285,6 +293,8 @@ template class Image { * overload, then calls @ref Image(PixelStorage, UnsignedInt, UnsignedInt, UnsignedInt) * with calculated pixel size. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ template /*implicit*/ Image(PixelStorage storage, T format, U formatExtra) noexcept; /** @@ -295,6 +305,8 @@ template class Image { * Equivalent to calling @ref Image(PixelStorage, T, U) with * default-constructed @ref PixelStorage. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ template /*implicit*/ Image(T format, U formatExtra) noexcept: Image{{}, format, formatExtra} {} /** @@ -306,6 +318,8 @@ template class Image { * overload, then calls @ref Image(PixelStorage, UnsignedInt, UnsignedInt, UnsignedInt) * with calculated pixel size and @p formatExtra set to @cpp 0 @ce. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ template /*implicit*/ Image(PixelStorage storage, T format) noexcept; /** @@ -606,6 +620,8 @@ template class CompressedImage { * data layout flags are empty. Move over a non-empty instance to make * it useful. */ + /* No ImageFlags parameter here as this constructor is mainly used to + query GL textures, and there the flags are forcibly reset */ /*implicit*/ CompressedImage(CompressedPixelStorage storage) noexcept; /**