From e9c70dbfd9b737ea501da7ad268e0618ef2404af Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 24 Jan 2023 16:58:47 -0800 Subject: [PATCH] Ensure vert_indices are always of type int --- manimlib/shader_wrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manimlib/shader_wrapper.py b/manimlib/shader_wrapper.py index f3159a5d..8d867128 100644 --- a/manimlib/shader_wrapper.py +++ b/manimlib/shader_wrapper.py @@ -37,7 +37,7 @@ class ShaderWrapper(object): is_fill: bool = False, ): self.vert_data = vert_data - self.vert_indices = vert_indices or np.zeros(0) + self.vert_indices = (vert_indices or np.zeros(0)).astype(int) self.vert_attributes = vert_data.dtype.names self.shader_folder = shader_folder self.uniforms = uniforms or dict() @@ -154,6 +154,7 @@ class ShaderWrapper(object): np.concatenate(data_list, out=self.vert_data) if indices_list is None: + self.vert_indices = resize_array(self.vert_indices, 0) return self total_verts = sum(len(vi) for vi in indices_list)