Skip to content

Commit

Permalink
Fix ShowBase.set_background_color() not working after simplepbr.init()
Browse files Browse the repository at this point in the history
We copy the clear color of the window to the FilterManager's buffer. This
is the work-around described in panda3d/panda3d#1401.
  • Loading branch information
Moguri committed Dec 5, 2023
1 parent c31595c commit 3aeec4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions simplepbr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ def _update(self, task: p3d.PythonTask) -> int:
if recompile:
self._recompile_pbr()

# Copy window background color so ShowBase.set_background_color() works
self._filtermgr.buffers[0].set_clear_color(self.window.get_clear_color())

return task.DS_cont


Expand Down

0 comments on commit 3aeec4e

Please sign in to comment.