From 7accf94c38fe5cc4496c3be049ac1247b857602b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 22 Feb 2023 11:49:01 +0100 Subject: [PATCH] GL: cover the singular Framebuffer::mapForDraw() with tests as well. --- src/Magnum/GL/Test/FramebufferGLTest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index c1bcad208..6ea81610c 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/src/Magnum/GL/Test/FramebufferGLTest.cpp @@ -1107,6 +1107,13 @@ void FramebufferGLTest::multipleColorOutputs() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_COMPARE(framebuffer.checkStatus(FramebufferTarget::Read), Framebuffer::Status::Complete); CORRADE_COMPARE(framebuffer.checkStatus(FramebufferTarget::Draw), Framebuffer::Status::Complete); + + /* Mapping just a single output. The comment re EXT_draw_buffers applies + here as well, so we can map just the 0th attachment, no other one. */ + framebuffer.mapForDraw(Framebuffer::ColorAttachment{0}); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE(framebuffer.checkStatus(FramebufferTarget::Draw), Framebuffer::Status::Complete); } void FramebufferGLTest::clear() {