Merge pull request #1800 from wubella/master

Fixing GLMeshItem memory leak in face drawing on 64-bit Linux (#1783)
This commit is contained in:
Ogi Moore 2021-05-23 21:22:31 -07:00 committed by GitHub
commit ed1653f3c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ class GLMeshItem(GLGraphicsItem):
if faces is None:
glDrawArrays(GL_TRIANGLES, 0, np.product(verts.shape[:-1]))
else:
faces = faces.astype(np.uint).flatten()
faces = faces.astype(np.uint32).flatten()
glDrawElements(GL_TRIANGLES, faces.shape[0], GL_UNSIGNED_INT, faces)
finally:
glDisableClientState(GL_NORMAL_ARRAY)