maybe i can find some help on this forum
this is quiet a strange issue,
i just want first to see if someone already faced it or if there are obvious repsonses.
I have a 2d application based on SDL/OpenGL (and cegui but lets assume problem is not in cegui).
i have a big leak on some PC only (even sometimes memory figure doesnt make sense it grows very quickly) when i am loading some 2d textures and freeing them.
to load a texture i do:
SDL_Surface *t = IMG_Load(filename);
hxSurface *work = LoadSurface(path,t);
where LoadSurface is kind of:
and in the freeSurface i do a:
in the render loop i do:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexCoord2f(u1, v1); glVertex2f(sx, sy);
glTexCoord2f(u2, v1); glVertex2f(sx+sw, sy);
glTexCoord2f(u2, v2); glVertex2f(sx+sw, sy+sh);
glTexCoord2f(u1, v2); glVertex2f(sx, sy+sh);
this is basic code;
my nigtmare is that on some pc it works.
and others no. obsviously on my development setup there is no leak …
any idea about something i forgot and that is ok on some drivers; not ok on some others? looks like on integrated intel graphic card problem is present.
on my “not leaking” pc glIntercept doesnt show any error nor leak.
i think i am forgetting a gl something to clear buffers or some memory, but dont know where.
in fact i dont think it is a “high level code” issue because as i said on most computers there is NO leaks. And textures are pretty bigs, so really if some high level code error was there i would have detected on all pcs.
And when leak occurs it is big.
The version is debug on both platform.
In fact another clue is that it looks like memory usages (ram memory) seems to increase extremely fast on leaking pc. could it be that some card cannot stores the textures in their video memory so this special scenario make ram to increase and expose some error code return from opengl api that i would not handle properly ?
hehe this one will busy me some times …
any idea welcome!