Couple of things:

1. If you are mipmapping then there will be increased memory usage.
2. Stupid suggestions, but make sure you are measuring memory after you have
garbage collected.
3. The source for the loader is available un the util jar if you want to
improve it.
4. If you are doing all that work, why not skip the texture loader and skip
right to building the texture and image components yourself?  All it does
for you is make mipmaps, and not very good ones at a that.

Dave Yazel

-----Original Message-----
From: Tom Lanning [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 8:04 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Textures and memory consumption


I am developing an application that uses a lot of large (512x512) textures.
If I use something like TextureLoader and let it load the images I end up
with consuming over 300M of memory ... much more than the size of the
textures.  I can reduce the memory by loading the images myself,
transforming them to a "power of 2" size, dispose the graphics context,
flush the image, and pass a BufferedImage to the TextureLoader constructor.
It sounds to me that TextureLoader is not disposing the Graphics2D and not
flushing any images it loads.  However, even with all this extra stuff, the
size of the application is much larger than it should be.  Is there anything
else I can do to reduce the memory consumption without reducing the texture
size?

  I am using the DirectX release version of J3D and JDK1.3.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to