From 9e03dd077a0099af050875dad3f336b3275a44f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Aug 2019 13:34:31 +0200 Subject: [PATCH] GL: fix test asserts with the recently-deprecated nullptr ImageView. --- src/Magnum/GL/Test/FramebufferGLTest.cpp | 2 +- src/Magnum/GL/Test/TextureGLTest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index 6a8e11a36..7faa77aa3 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/src/Magnum/GL/Test/FramebufferGLTest.cpp @@ -1599,7 +1599,7 @@ void FramebufferGLTest::readViewNullptr() { Framebuffer framebuffer({{}, Vector2i(128)}); framebuffer.attachRenderbuffer(Framebuffer::ColorAttachment(0), color); - MutableImageView2D view{DataStorage, PixelFormat::RGBA, PixelType::UnsignedByte, {8, 16}, {nullptr, (DataOffset + 8*15)*sizeof(Color4ub)}}; + MutableImageView2D view{DataStorage, PixelFormat::RGBA, PixelType::UnsignedByte, {8, 16}}; std::ostringstream out; Error redirectError{&out}; diff --git a/src/Magnum/GL/Test/TextureGLTest.cpp b/src/Magnum/GL/Test/TextureGLTest.cpp index ade7356a8..e32088491 100644 --- a/src/Magnum/GL/Test/TextureGLTest.cpp +++ b/src/Magnum/GL/Test/TextureGLTest.cpp @@ -2902,7 +2902,7 @@ void TextureGLTest::srgbStorage() { #else PixelFormat::SRGB #endif - , PixelType::UnsignedByte, Vector2i{32}, nullptr}); + , PixelType::UnsignedByte, Vector2i{32}, {nullptr, 32*32*3}}); MAGNUM_VERIFY_NO_GL_ERROR(); @@ -2936,7 +2936,7 @@ void TextureGLTest::srgbAlphaStorage() { #else PixelFormat::SRGBAlpha #endif - , PixelType::UnsignedByte, Vector2i{32}, nullptr}); + , PixelType::UnsignedByte, Vector2i{32}, {nullptr, 32*32*4}}); MAGNUM_VERIFY_NO_GL_ERROR();