Bug 610 : updatePixels wth OpenGL requires a lot of memory, implement better texture update
Last modified: 2007-11-27 18:51




Status:
ASSIGNED
Resolution:
-
Priority:
P2
Severity:
enhancement

 

Reporter:
th7511
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-08-23 16:05
Hello,
I have a problem of memory using opengl.
I have 3 images, i update them on a key event.
Each update, the memory needed by my applet increase a lot (then after a while: the
system go very slow to manage it). I tested a lot, the problem is on updatePixels (no
difference with or without loadPixels)
no problem with P3D. I'm on a macbook pro, using Processing 0125

I did a minimal version: mouse to move and r,f,t,y,g or v to update pictures.each update
increase memory around 1-2 Mo
updatePixels are on helpload.pde

Tell me if you need more informations.
Thank you for your fast respond to my previous reports and for "Processing" of course.
Cordialy,
Thierry
Additional Comment #1 From th7511 2007-08-23 17:26
failed in attaching minimal pde with data: internal server error

all problematics stuff is on draw() and in helpload.pde (i updatepixels there)
others things is to manage my kind of data and mouse.

you could download it here:
http://bioemergence.in2p3.fr/small.zip
Additional Comment #2 From fry 2007-08-24 16:26
so i've just tracked this down...having fixed the memory leaking bug with
textures, the same release also added mipmapping for better texture
accuracy. and now, the mipmapping leaks memory. not sure if it's a jogl
problem or if it's something we've done, but i've at least tracked it down.
will have to look into it further--might just be something fixed in more
recent JOGL releases.

thanks for posting this to the bugs db and the example.
Additional Comment #3 From fry 2007-10-04 15:38
for 0126, mipmapping will be shut off temporarily until a fix can be found.
Additional Comment #4 From fry 2007-11-21 04:33
this appears to be simply a problem that a lot of memory is required. it's
not a memory leak, because when it needs to, the memory will be freed and
made available for other operations. there's no OutOfMemoryError, it's just
that it requires a lot of RAM to continually update a lot of textures.

so i'm changing this to a feature request, to improve how textures are
updated, so that they are not re-created when new pixels are applied. there
are opengl functions to handle this so that we can update only as necessary.
Additional Comment #5 From th7511 2007-11-27 18:51
hi,
thank you for your job.
i don't have this problem since anymore 0127 (i guess)
and sure no problem with 0133...

cordialy
This bug is now being tracked here.