memory leaks with pyOpenGL v2

I'm having a problem with rendering vertex-arrays with pyOpenGL 2. The problem only appears on some installations, and with pyOpenGL 3 everything is fine.

The problem is that opengl seems to keep a reference to the vertex-array, which i have to update every frame, which leads to a memory leak.

this is how i do it..

co_s = co.tostring() # co is an array('f')
glVertexPointer(3, GL_FLOAT, 0, co_s)
glDrawArrays(GL_TRIANGLES, 0, vertcount)

How should i make opengl release the buffer after it's used?

version 2 is considered the latest stable release right? i'd really like to drop the support for it, but since version 3 isn't shipped with ubuntu that doesn't seem to be an option :/

also; i have written a small optimization for keyframe animations as a compiled module in c. is that allowed, as long as the source is included and there is a fallback on a slower python-routine?

(log in to comment)

Comments

I'm pretty sure you can optimize with C as long as it's written during the comp. I seem to remember philhassey doing that a lot.
teppic: try reading the rules page. It's not long :)