Bug fix in cases where empty array is passed to shader

This commit is contained in:
Grant Sanderson 2022-03-16 12:23:11 -07:00
parent 06405d5758
commit fa38b56fd8

View file

@ -439,7 +439,7 @@ class Camera(object):
shader[name].value = tid
for name, value in it.chain(self.perspective_uniforms.items(), shader_wrapper.uniforms.items()):
try:
if isinstance(value, np.ndarray):
if isinstance(value, np.ndarray) and value.ndim > 0:
value = tuple(value)
shader[name].value = value
except KeyError: