Skip to content

Commit

Permalink
allow setting view before show
Browse files Browse the repository at this point in the history
  • Loading branch information
Licini committed Jul 2, 2024
1 parent 174f2e1 commit 1c0358a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/compas_viewer/renderer/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ def view(self):
@view.setter
def view(self, view):
self._view = view
self.shader_model.bind()
self.shader_model.uniform4x4("projection", self.camera.projection(self.width(), self.height()))
self.shader_model.release()
self.camera.reset_position()
self.update_projection()
self.update()
if self.viewer.running:
self.shader_model.bind()
self.shader_model.uniform4x4("projection", self.camera.projection(self.width(), self.height()))
self.shader_model.release()
self.update_projection()
self.update()

@property
def opacity(self) -> float:
Expand Down

0 comments on commit 1c0358a

Please sign in to comment.