Skip to content

Commit

Permalink
better workaround for imgui not rendering on first frame
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 7, 2024
1 parent 390e0a9 commit a3001c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ogre_mesh_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,9 @@ def setup(self):
self.gui = MeshViewerGui(self)
self.getRenderWindow().addListener(self.gui)

self.getRoot().renderOneFrame()
# imgui needs warmup to render on first frame
# see https://github.com/ocornut/imgui/issues/1893#issuecomment-399102821
self.getRenderWindow().update(False)
self.getRoot().renderOneFrame()

Ogre.LogManager.getSingleton().logMessage(f"Opening file: {os.path.normpath(self.infile)}")
Expand Down

0 comments on commit a3001c0

Please sign in to comment.