From 033aa58b4051983ffc48fbf98001d4fb9872651a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Fri, 13 Oct 2023 18:10:57 -0300 Subject: [PATCH] Made background buffer use less memory. --- mrv2/lib/mrvGL/mrvGLViewport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mrv2/lib/mrvGL/mrvGLViewport.cpp b/mrv2/lib/mrvGL/mrvGLViewport.cpp index 20ffc54e6..5386fcea6 100644 --- a/mrv2/lib/mrvGL/mrvGLViewport.cpp +++ b/mrv2/lib/mrvGL/mrvGLViewport.cpp @@ -212,13 +212,6 @@ namespace mrv { gl::OffscreenBufferOptions offscreenBufferOptions; offscreenBufferOptions.colorType = image::PixelType::RGBA_F32; - if (!p.displayOptions.empty()) - { - offscreenBufferOptions.colorFilters = - p.displayOptions[0].imageFilters; - } - offscreenBufferOptions.depth = gl::OffscreenDepth::_24; - offscreenBufferOptions.stencil = gl::OffscreenStencil::_8; if (gl::doCreate( gl.background, renderSize, offscreenBufferOptions)) { @@ -226,6 +219,13 @@ namespace mrv renderSize, offscreenBufferOptions); } + if (!p.displayOptions.empty()) + { + offscreenBufferOptions.colorFilters = + p.displayOptions[0].imageFilters; + } + offscreenBufferOptions.depth = gl::OffscreenDepth::_24; + offscreenBufferOptions.stencil = gl::OffscreenStencil::_8; if (gl::doCreate(gl.buffer, renderSize, offscreenBufferOptions)) { gl.buffer = gl::OffscreenBuffer::create(