From: Alban <aco...@wa...> - 2002-11-01 10:20:55
|
Hi Peter, Here is a little checklist that might help you solving your problem : Your animation may be stuttering because of frequent runs of the garbage collector. This can happen if you create and destroy a lot of objects per frame. To avoid this, make sure you never create any temporary objects in your rendering loop, having a preference using values that are global to your classes. Running your program using the option -Xincgc will smooth the garbage collection over time (but also reduce performance) and this can help you figure out if the gc is responsible of your problem. -> java -Xincgc yourclass You don't need to compile arrays into display lists (this is really useless= , I have not noticed any percent of performance increase testing this feature), but it is always good to lock your vertex arrays. It allows the driver to optimize the vertex data access in memory and thus gain performance. Make sure you don't recompile your display lists at each frame (this a stupid advice, but we never know...) Make sure your hard disk drive is not swapping during the rendering, this would explain the poor / unregular access to the vertex data in memory. If so, add more RAM to your computer. Allocate more RAM than needed to the virtual machine, I've had the feeling it was increasing a bit the performance. For this, use the flag -Xmx -> java -Xmx256000000 yourclass (to allocate 256Megs of memory to the program) Make sure you don't have 3dsMax or any third party openGL application launched in the background when you execute your program. In some cases, 3dsMAX make me loose up 70% of my application performance, and I hask mysel= f "what the f%% is going on ?"..."oh max is running in the background..." Don't use too small arrays. Small counts of polygons like 50-200 won't make you benefit of a real performance increase. Prefer having several thousand faces per array if possible. I'm personnaly using vertex arrays having very good and smooth performance under a geForce2MX. What 3d card do you have ? Regards, Alban Cousini=E9 Mind2Machine |