From: Mikko Rasa Date: Fri, 1 Oct 2021 15:26:07 +0000 (+0300) Subject: Tweak handling flags in PipelineState::set_framebuffer X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3c0cbf0529aa06d9809ad3aa9e282400e8209b4d;p=libs%2Fgl.git Tweak handling flags in PipelineState::set_framebuffer Viewports work slightly differently on Vulkan, so set only the framebuffer flag here and instead check both when applying the state. --- diff --git a/source/core/pipelinestate.cpp b/source/core/pipelinestate.cpp index 262dd26b..78db195d 100644 --- a/source/core/pipelinestate.cpp +++ b/source/core/pipelinestate.cpp @@ -69,7 +69,7 @@ void PipelineState::set(T &target, T value, unsigned flag) void PipelineState::set_framebuffer(const Framebuffer *f) { - set(framebuffer, f, FRAMEBUFFER|VIEWPORT); + set(framebuffer, f, FRAMEBUFFER); } void PipelineState::set_viewport(const Rect *v) @@ -172,7 +172,7 @@ void PipelineState::apply(unsigned mask) const } } - if(mask&VIEWPORT) + if(mask&(VIEWPORT|FRAMEBUFFER)) { if(viewport) glViewport(viewport->left, viewport->bottom, viewport->width, viewport->height);