Skip to content

Commit

Permalink
Disabling anti-aliasing to get rid of Black Screen on Docker or MVs w…
Browse files Browse the repository at this point in the history
…hen using OpenGL 4.5. See gazebosim/gz-sim#1116
  • Loading branch information
rubenanapu committed Jun 8, 2023
1 parent b32cbd3 commit 5da34c2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ogre/include/gz/rendering/ogre/OgreRenderTarget.hh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace gz

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 = GZ_VISIBILITY_ALL;
Expand Down
2 changes: 1 addition & 1 deletion ogre/src/OgreRenderEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,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())
Expand Down
2 changes: 1 addition & 1 deletion ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ namespace gz
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 = GZ_VISIBILITY_ALL;
Expand Down
2 changes: 1 addition & 1 deletion ogre2/src/Ogre2RenderEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,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())
Expand Down
4 changes: 2 additions & 2 deletions ogre2/src/Ogre2RenderTarget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ uint8_t Ogre2RenderTarget::TargetFSAA() const
targetFSAA = 0u;
}

if (targetFSAA == 0u)
targetFSAA = 1u;
// if (targetFSAA == 0u)
// targetFSAA = 1u;

return static_cast<uint8_t>(targetFSAA);
}
Expand Down

0 comments on commit 5da34c2

Please sign in to comment.