defred
YaBB Newbies
Offline
Posts: 11
GLGraphics memory issue
Feb 10th , 2010, 4:24am
Hello, I have finished writing a "photomaton" application for an exhibition, but while running it for testing, I eventually found that the application never stop eating RAM, and cannot run for a long time. Basically what the application does is loading 4 images into textures, applying some GLSL effects to them, then "additive crossfade" the 2 resulting textures (using GLSL too). Once the crossfade is over, the 4 textures are initialized and renewed with 4 new images. I double checked the code so that any GLTextureFilter or GLTexture are really replaced by new ones during the process. So after I managed to see the problem, I wandered here and on the GLGraphics sites to see if there was any trace of workaround for this type of memory problem. I found one post with a very simple script that creates the problem: [can't post link, arrg] I work on linux (ubuntu 9.10), and have several computer so I tested this with the following configuration (always ubuntu 9.10, processing 1.0.9, and proprietary ATI or Nvidia drivers) - AMD (sempron ?) 2Ghz / ATI Mobility radeon HD 3450 / 64 bits OS - AMD (sempron ?) 2Ghz / ATI Mobility radeon HD 3450 / 32 bits OS - Intel Core2duo 2.4 / Nvidia Gforce 8600M GT / 64 bits OS So I'm currently looking for infos, does this behavior is related to the GLGraphics library ? Or is it a more general Processing issue ? As I looked deeper in the GLGraphics API I noticed the " clear(int) " methods and I tried to use this to really "initialize" the texture each time it changes, with no luck. My application uses large images, but should not use more than 4 of them (into textures) at the same time, so even if they took 10 mo each, that my filters created 8 textures for each image, that would be : (4x10)x8 = 320 Mo maximum. There is room in ram, but it seems it constantly adds the texture and never unload them. As the application is meant to run at least 6 hours a day, it's a concern and I'm stuck. Thanks for any help. dF