[PyOpenGL-Users] glInterleavedArrays memory leak
Brought to you by:
mcfletch
|
From: Micah D. <mi...@na...> - 2003-07-23 10:29:44
|
Hi Everybody,
I believe I found a memory leak in PyOpenGL's wrapper for
glInterleavedArrays. The following is the simplest test case I could
come up with:
------8<------
import pygame, time
from pygame.locals import *
from OpenGL.GL import *
pygame.init()
pygame.display.set_mode((640,480), OPENGL|DOUBLEBUF)
while 1:
glInterleavedArrays(GL_T2F_N3F_V3F, 0, " " * 10000)
time.sleep(0.01)
------>8------
In 'top' this should show the python process' memory usage steadily
rising. This is from a Gentoo Linux system on an Athlon XP.
I have tested it with PyOpenGL 2.0.0.42 and 2.0.1.04, both show the bug.
As much as I'm interested in helping squash this bug, I'm also
interested in finding a workaround so my users (when they exist :) won't
absolutely have to have the latest PyOpenGL code.
I have tried using glVertexPointer and friends, however
glTexCoordPointerf() would always cause an "OpenGL.GL.GLerror: [Errno
1281] invalid value" exception.
I'd like to thank the PyOpenGL developers for bringing such a neat
interface to life. I have been using it for a 3D frontend to PyBZFlag
with amazing results. Most people think Python is too slow for games,
then they see what can be accomplished with outstanding modules like
PyOpenGL and Numeric :)
In case you're curious, I have a few screenshots of what we've done so
far: (Yep, there's a realtime cloth simulation in there too)
http://navi.picogui.org/images/bzflag/
The code is in BZFlag's CVS repository.
--Micah
--
Only you can prevent creeping featurism!
|