Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ogre2] Fix invalid anti-aliasing level warning #470

Conversation

srmainwaring
Copy link
Contributor

🦟 Bug fix

Fixes issue discussed in #463 (comment)

Summary

This PR fixes a bug where the invalid anti-aliasing level warning in Ogre2RenderTarget::TargetFSAA() was not being output and the FSAA level was not being set to a default value of 0. This can cause the scene to fail to render.

The code will now output a warning, provide a list of valid options and set the anti-aliasing level to 0.

The code can be tested by changing the camera anti-aliasing level in the simple_demo example:

Modify:

https://github.com/ignitionrobotics/ign-rendering/blob/1c77a8ac05cce3ed5a5b99e56030db833ad67b0a/examples/simple_demo/Main.cc#L179

to

// create camera
camera->SetAntiAliasing(3);

The console output is:

[Wrn] [Ogre2RenderTarget.cc:573] Anti-aliasing level of '3' is not supported; valid FSAA levels are: [ 1 2 4 8 ]. Setting to 0

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

- Fix a bug where the warning of an invalid anti-aliasing level in Ogre2RenderTarget was not being output
- Set the FSAA level to 0 if the target level is invalid
- Provide a list of valid options in the warning

Signed-off-by: Rhys Mainwaring <[email protected]>
@github-actions github-actions bot added 🌱 garden Ignition Garden 🏯 fortress Ignition Fortress labels Oct 14, 2021
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #470 (b6fe335) into ign-rendering6 (1c77a8a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head b6fe335 differs from pull request most recent head daa62d8. Consider uploading reports for the commit daa62d8 to get more accurate results
Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering6     #470      +/-   ##
==================================================
+ Coverage           53.50%   53.51%   +0.01%     
==================================================
  Files                 192      192              
  Lines               19562    19569       +7     
==================================================
+ Hits                10466    10473       +7     
  Misses               9096     9096              
Impacted Files Coverage Δ
ogre2/src/Ogre2RenderTarget.cc 86.05% <100.00%> (-0.01%) ⬇️
...e/ignition/rendering/base/BaseGaussianNoisePass.hh 100.00% <0.00%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c77a8a...daa62d8. Read the comment docs.

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@iche033
Copy link
Contributor

iche033 commented Oct 14, 2021

retriggered a couple of CI builds that failed for unrelated reason. Merging this once CI is green

@iche033 iche033 merged commit 676321e into gazebosim:ign-rendering6 Oct 15, 2021
@srmainwaring srmainwaring deleted the feature/ign-rendering6-fix-rendertarget-fsaa branch October 15, 2021 10:38
srmainwaring added a commit to srmainwaring/gz-rendering that referenced this pull request Oct 21, 2021
- Fix a bug where the warning of an invalid anti-aliasing level in Ogre2RenderTarget was not being output
- Set the FSAA level to 0 if the target level is invalid
- Provide a list of valid options in the warning

Signed-off-by: Rhys Mainwaring <[email protected]>
WilliamLewww pushed a commit to WilliamLewww/ign-rendering that referenced this pull request Dec 7, 2021
- Fix a bug where the warning of an invalid anti-aliasing level in Ogre2RenderTarget was not being output
- Set the FSAA level to 0 if the target level is invalid
- Provide a list of valid options in the warning

Signed-off-by: Rhys Mainwaring <[email protected]>
Signed-off-by: William Lew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress 🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants