Skip to content

Commit

Permalink
Fix Ogre2RenderTarget::TargetFSAA (#661)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
traversaro authored Jul 1, 2022
1 parent d773877 commit 2adcb97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ogre2/src/Ogre2RenderTarget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2adcb97

Please sign in to comment.