How to optimize Java 3D memory usage
My 3D model switches between 6 different textures. Each texture set is about 700K. When I run my applet, it can eat 400M memory very easily. -- --!
I find that the more textures I have, the more memory the applet will use. If use 2 texture sets, it will eat 180M.
At first, the momory usage is 200M, but when I begin to switch textures, the memory usage increases as fast as a rocket....
I wonder is there any ways to help optimize Java 3D memory usage?
This is how I set the original texture:
textureUnitStateTop = new TextureUnitState(oakWoodTextureTop, texAttr1, null);
This is how I change texture: