From 0eb3d19cd246485158a05f4ba7803e2698275e48 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 29 Sep 2011 10:00:53 +0900 Subject: [PATCH] optimize --- examples/opengl/vertexarray.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/opengl/vertexarray.py b/examples/opengl/vertexarray.py index c1d758e..ccc304b 100644 --- a/examples/opengl/vertexarray.py +++ b/examples/opengl/vertexarray.py @@ -120,8 +120,10 @@ class IndexedVertexArray(object): glDisableClientState(GL_VERTEX_ARRAY) def optimize(self): - self.vertices=numpy.array(self.vertices, 'f') - self.uvlist=numpy.array(self.uvlist, 'f') + self.vertices=numpy.array(self.vertices, numpy.float32) + self.uvlist=numpy.array(self.uvlist, numpy.float32) + for m, indices in self.indicesMap.items(): + self.indicesMap[m]=numpy.array(indices, numpy.uint32) def get_boundingbox(self): vertices_size=len(self.vertices) -- 2.11.0