From 3e0814c342a290e1c8f8a4eb5ecf18c1b26e8d8f Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 31 May 2022 13:49:25 +0000 Subject: [PATCH] Disabling anti-aliasing to get rid of Black Screen on Docker or MVs when using OpenGL 4.5. See https://github.com/gazebosim/gz-sim/issues/1116#issuecomment-954908919 --- ogre/include/ignition/rendering/ogre/OgreRenderTarget.hh | 2 +- ogre/src/OgreRenderEngine.cc | 2 +- ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh | 2 +- ogre2/src/Ogre2RenderEngine.cc | 2 +- ogre2/src/Ogre2RenderTarget.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ogre/include/ignition/rendering/ogre/OgreRenderTarget.hh b/ogre/include/ignition/rendering/ogre/OgreRenderTarget.hh index 9fddb44ee..f09c70cc3 100644 --- a/ogre/include/ignition/rendering/ogre/OgreRenderTarget.hh +++ b/ogre/include/ignition/rendering/ogre/OgreRenderTarget.hh @@ -122,7 +122,7 @@ namespace ignition protected: bool colorDirty = true; - protected: unsigned int antiAliasing = 4; + protected: unsigned int antiAliasing = 0; /// \brief visibility mask associated with this render target protected: uint32_t visibilityMask = IGN_VISIBILITY_ALL; diff --git a/ogre/src/OgreRenderEngine.cc b/ogre/src/OgreRenderEngine.cc index b6f2f19aa..724586ade 100644 --- a/ogre/src/OgreRenderEngine.cc +++ b/ogre/src/OgreRenderEngine.cc @@ -542,7 +542,7 @@ void OgreRenderEngine::CreateRenderSystem() // check if target fsaa is supported unsigned int fsaa = 0; - unsigned int targetFSAA = 4; + unsigned int targetFSAA = 0; auto const it = std::find(this->dataPtr->fsaaLevels.begin(), this->dataPtr->fsaaLevels.end(), targetFSAA); if (it != this->dataPtr->fsaaLevels.end()) diff --git a/ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh b/ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh index 229157378..175c271b2 100644 --- a/ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh +++ b/ogre2/include/ignition/rendering/ogre2/Ogre2RenderTarget.hh @@ -222,7 +222,7 @@ namespace ignition protected: bool backgroundMaterialDirty = false; /// \brief Anti-aliasing level - protected: unsigned int antiAliasing = 4; + protected: unsigned int antiAliasing = 0; /// \brief visibility mask associated with this render target protected: uint32_t visibilityMask = IGN_VISIBILITY_ALL; diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index 29083d8f0..606957ce2 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -643,7 +643,7 @@ void Ogre2RenderEngine::CreateRenderSystem() // check if target fsaa is supported unsigned int fsaa = 0; - unsigned int targetFSAA = 4; + unsigned int targetFSAA = 0; auto const it = std::find(this->dataPtr->fsaaLevels.begin(), this->dataPtr->fsaaLevels.end(), targetFSAA); if (it != this->dataPtr->fsaaLevels.end()) diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index 98030b9fa..6567996ec 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -581,7 +581,7 @@ uint8_t Ogre2RenderTarget::TargetFSAA() const } if (targetFSAA == 0u) - targetFSAA = 1u; + targetFSAA = 0u; return static_cast(targetFSAA); }