Re: [PyOpenGL-Users] glInterleavedArrays memory leak
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-08-02 12:40:45
|
Rene Dudfield wrote: ... > The memory leak is there. It leaks with numeric arrays as well. :( ... > It's related to the way that array related functions in pyopengl are > used. I've been thinking of redoing them for a while but haven't had > time :( The typemaps are definitely the hairiest part of PyOpenGL. I'd really love to rewrite them in a more robust way (was considering producing them with a Python script, rather than the huge numbers of pre-processor macros currently used). What I'd like even more would be a test-suite for the set of type-maps, but that's probably beyond my resources for a good long while. ... > I will eventually add this into pyopengl I think. That is a seperate > sub module for numeric stuff. Which would be automatically detected > and included into OpenGL.GL using python. I'll try to get some time to look at it. Too many projects going simultaneously, and with the new job I really don't have more than a few hours/week to work on the Open Source stuff that isn't related to the job. Probably should wade through the patches and bug-reports that have been piling up first I suppose :) . > Along with some PyArray_ContiguousFromObject type function calls to > allow you to check if memory is being copied unnecessarily(or did you > allready add something like this Mike?). The code currently only copies if there is a type mis-match. However, it would likely be a better strategy to first see if there's a matching function for the given data-type and use that instead of the specified function. i.e. if someone calls gl*Pointerf( ) with a double array, use the gl*Pointerd( ) version rather than converting to 'f' and calling the specified function. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |