Hide dummy OGRE render window on macOS#1245
Open
inbarajaldrin wants to merge 1 commit intogazebosim:gz-rendering8from
Open
Hide dummy OGRE render window on macOS#1245inbarajaldrin wants to merge 1 commit intogazebosim:gz-rendering8from
inbarajaldrin wants to merge 1 commit intogazebosim:gz-rendering8from
Conversation
|
Hi @inbarajaldrin thanks for the contribution! Could you please fill out the pull request template? It's the content already placed in the PR description when you create a new PR. |
eb1c398 to
17d4ef9
Compare
Author
|
Hi @azeey, I've updated the PR description with the template. |
The initialization render window created by Ogre2RenderEngine for GPU resource setup (HLMS, compositor) was visible on macOS as a blank 'OgreWindow(0)_0' window. This window serves no purpose after initialization and can be safely closed by the user without affecting rendering. Two changes: 1. Pass params["hidden"] = "true" when creating the dummy window. Both Metal (OgreMetalWindow) and GL3Plus (OgreOSXCocoaWindow) backends already support this parameter. 2. Guard _setVisible(true) to only apply to real render windows (width/height > 1), preventing the dummy window from being re-shown after creation. Tested on macOS 26 (Tahoe) with Apple M4, Gazebo Harmonic 8.10.0 via conda-forge/RoboStack packages. Signed-off-by: Aldrin Inbaraj <125698539+inbarajaldrin@users.noreply.github.com> Generated-by: Claude (Anthropic)
17d4ef9 to
e73f54b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Summary
On macOS,
Ogre2RenderEngine::CreateRenderWindow()creates a 1x1 dummy window for GPU resource initialization (HLMS, compositor setup). This window appears as a visible blank "OgreWindow(0)_0" window alongside the actual Gazebo GUI. Users can close it without affecting rendering, but it shouldn't be visible in the first place.Before: Blank "OgreWindow(0)_0" window appears on every Gazebo launch on macOS
After: Dummy window is created hidden and stays hidden
How to reproduce (before fix):
gz sim -s -r shapes.sdf &thengz sim -gRoot cause:
Two issues in
ogre2/src/Ogre2RenderEngine.cc:Line ~1224: The comment says "Hide window if dimensions are less than or equal to one" but only sets
params["border"] = "none"— it never passesparams["hidden"] = "true"to OGRE-Next. Both the Metal (OgreMetalWindow) and GL3Plus (OgreOSXCocoaWindow) backends already support this parameter.Line ~1303: After window creation,
this->window->_setVisible(true)unconditionally shows the window, which would override the hidden flag even if it were set.Changes:
params["hidden"] = "true"when creating the dummy render window_setVisible(true)to only apply to real render windows (_width > 1 && _height > 1), preventing the dummy window from being re-shown after creationTesting:
Related: Similar issue reported for RViz on Windows: ms-iot/ROSOnWindows#336 (same OGRE dummy window pattern)
Checklist
codecheckpassed (See contributing)Generated-by: Claude (Anthropic)
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.