Move where refreshing shader uniforms happens

This commit is contained in:
Grant Sanderson
2020-03-06 06:16:09 -08:00
parent cfe72922ca
commit 7785a06441
2 changed files with 2 additions and 2 deletions

View File

@ -211,6 +211,8 @@ class Camera(object):
# Rendering
def capture(self, *mobjects, **kwargs):
self.refresh_shader_uniforms()
shader_infos = it.chain(*[
mob.get_shader_info_list()
for mob in mobjects

View File

@ -541,7 +541,6 @@ class Scene(Container):
frame.scale(factor, about_point=point)
else:
frame.shift(-30 * offset)
self.camera.refresh_shader_uniforms()
def on_key_release(self, symbol, modifiers):
if chr(symbol) == "z":
@ -550,7 +549,6 @@ class Scene(Container):
def on_key_press(self, symbol, modifiers):
if chr(symbol) == "r":
self.camera.frame.restore()
self.camera.refresh_shader_uniforms()
elif chr(symbol) == "z":
self.zoom_on_scroll = True
elif chr(symbol) == "q":