pyopengl icon indicating copy to clipboard operation
pyopengl copied to clipboard

huge memory allocation when sending numpy array to vbo, despite ERROR_ON_COPY

Open LBdN opened this issue 7 years ago • 0 comments

When I sent this big numpy array to the vbo, the memory goes up a gig.

The shape of the array is (120000, 1), each vertex is x,y,z,r,g,b.

I added OpenGL.ERROR_ON_COPY = True but it doesn't trigger.

the vbo line is self.vbo = vbo_mod.VBO( vertices, usage=buffer.usage) . Nothing special AFAICT.

The only lead I have, is that I build and delete many vao/vbos as the mesh is filled and they are kept in memory (even if one uses vbo.delete(), which I do ).

Either I am doing something wrong or I hit a buggy use case.

Any idea on how to solve this ?

LBdN avatar May 13 '17 08:05 LBdN