Browse Source

Fix allocation error in FramebufferGLTest.

Forgot that Range constructor takes (min, max) and not (min, size).
Everything else changed by 60d1259483 is
not affected, as `min` is set to `{}`.
pull/87/head
Vladimír Vondruš 11 years ago
parent
commit
13e6f13a2d
  1. 4
      src/Magnum/Test/FramebufferGLTest.cpp

4
src/Magnum/Test/FramebufferGLTest.cpp

@ -789,7 +789,7 @@ void FramebufferGLTest::read() {
Renderer::setClearStencil(67);
framebuffer.clear(FramebufferClear::Color|FramebufferClear::Depth|FramebufferClear::Stencil);
Image2D colorImage = framebuffer.read({{16, 8}, {8, 16}}, {ColorFormat::RGBA, ColorType::UnsignedByte});
Image2D colorImage = framebuffer.read(Range2Di::fromSize({16, 8}, {8, 16}), {ColorFormat::RGBA, ColorType::UnsignedByte});
MAGNUM_VERIFY_NO_ERROR();
CORRADE_COMPARE(colorImage.size(), Vector2i(8, 16));
@ -865,7 +865,7 @@ void FramebufferGLTest::readBuffer() {
Renderer::setClearStencil(67);
framebuffer.clear(FramebufferClear::Color|FramebufferClear::Depth|FramebufferClear::Stencil);
BufferImage2D colorImage = framebuffer.read({{16, 8}, {8, 16}}, {ColorFormat::RGBA, ColorType::UnsignedByte}, BufferUsage::StaticRead);
BufferImage2D colorImage = framebuffer.read(Range2Di::fromSize({16, 8}, {8, 16}), {ColorFormat::RGBA, ColorType::UnsignedByte}, BufferUsage::StaticRead);
CORRADE_COMPARE(colorImage.size(), Vector2i(8, 16));
MAGNUM_VERIFY_NO_ERROR();

Loading…
Cancel
Save