mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Ensure vert_indices are always of type int
This commit is contained in:
parent
72da9786a3
commit
e9c70dbfd9
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue