From 81c9cb48f71b0a7505585b207475b484cefdd10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 21 Sep 2020 12:11:40 +0200 Subject: [PATCH] Trade: use setStorage() in the ImageData doc snippet as well. --- doc/snippets/MagnumTrade.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/snippets/MagnumTrade.cpp b/doc/snippets/MagnumTrade.cpp index a39cae32f..02b96f50d 100644 --- a/doc/snippets/MagnumTrade.cpp +++ b/doc/snippets/MagnumTrade.cpp @@ -51,6 +51,7 @@ #include "Magnum/Trade/PhongMaterialData.h" #ifdef MAGNUM_TARGET_GL #include "Magnum/GL/Texture.h" +#include "Magnum/GL/TextureFormat.h" #include "Magnum/GL/Mesh.h" #include "Magnum/MeshTools/Compile.h" #include "Magnum/Shaders/Phong.h" @@ -232,7 +233,8 @@ Containers::Optional image = importer->image2D(0); if(!image) Fatal{} << "Oopsie!"; GL::Texture2D texture; -// ... +DOXYGEN_IGNORE() +texture.setStorage(1, GL::textureFormat(image->format()), image->size()); if(!image->isCompressed()) texture.setSubImage(0, {}, *image); else