From 52b0b5992738667a00bbe55514a165fbabc56c0b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 1 Jul 2022 10:20:18 +0200 Subject: [PATCH] Fix Ogre2RenderTarget::TargetFSAA Fix Ogre2RenderTarget::TargetFSAA method that caused black screen when used with llvmpipe (i.e. software rendering on Linux) The Ogre2RenderTarget::TargetFSAA method has a logic to check if the selected antialiasing level is supported. If the requested antialiasing level is not supported, the 0 level is selected instead. Furthermore, a warning is printed only once for process. Before this PR, the 0 level was only set only when the warning was printed, resulting in an unsupported antialiasing being set if Ogre2RenderTarget::TargetFSAA was called two or more times. Signed-off-by: Silvio --- ogre2/src/Ogre2RenderTarget.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index 98030b9fa..200a48ec3 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -575,9 +575,9 @@ uint8_t Ogre2RenderTarget::TargetFSAA() const ignwarn << "Anti-aliasing level of '" << this->antiAliasing << "' " << "is not supported; valid FSAA levels are: " << os.str() << ". Setting to 0" << std::endl; - targetFSAA = 0u; ogre2FSAAWarn = true; } + targetFSAA = 0u; } if (targetFSAA == 0u)