Skip to content

Commit 2fbe792

Browse files
committed
small fix
1 parent 3c16d9b commit 2fbe792

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compas_viewer/renderer/renderer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ def paint(self, is_instance: bool = False):
548548

549549
viewworld = self.camera.viewworld()
550550
self.update_projection()
551+
552+
# rebind the model shader
551553
self.shader_model.bind()
552554

553555
# TODO: figure out which ones are actually needed
@@ -579,12 +581,11 @@ def paint(self, is_instance: bool = False):
579581
self.shader_tag.uniform4x4("viewworld", viewworld)
580582
for obj in tag_objs:
581583
obj.draw(self.shader_tag, self.camera.position, self.width(), self.height())
582-
# switch back to the model shader
583584
self.shader_tag.release()
584-
self.shader_model.bind()
585585

586586
# draw 2D box for multi-selection
587587
if self.viewer.mouse.is_tracing_a_window:
588+
self.shader_model.release()
588589
self.shader_model.draw_2d_box(
589590
(
590591
self.viewer.mouse.window_start_point.x(),

0 commit comments

Comments
 (0)