From: Alban C. <aco...@wa...> - 2001-11-09 19:28:50
|
Hi everybody, I've been reading Kenneth words about increasing performance using the event listener model with a lot of interest. So I have jumped on my keyboard in order to test if it would improve the display speed of my application, wich is divided by 2 at high resolution, so I have some kind of *fill rate* problem... Untill now, I was using a simple subclass of GLAnimCanvas wich I refer as the "classic model" in the little benchmarck below. I have implemented the GLEventlistener model using all the optimizations kenneth refers in his mail : - Create a gl4java.GLCapabilities object - Pass this capabilities object to gl4java.drawable.GLDrawableFactory.getFactory() - Call addGLEventListener on the resulting GLDrawable For highest performance: - Call GLDrawableFactory.createGLAnimCanvas() - Call setUseRepaint(false), setUseFpsSleep(false), and setUseYield(false) on the resulting GLAnimCanvas I am using gl4java 2.8 very latest release from sourceforge. I run a geforce 2 MX 100 with 32MB onboard. OS is windows 2000. Meshes are displayed with no optimisation (neither arrays nor display lists) Meshes are non textured. Meshes are lit. here are the results I get : plane (1600 Polys) classic model UC util = 42% 640*480 85 img/sec UC util = 28% 1280*960 43 img/sec plane (1600 Polys) listener model UC util = 42% 640*480 85 img/sec UC util = 25% 640*480 43 img/sec sphere (40 000 Polys) classic model UC util = 100% 640*480 7 img/sec UC util = 100% 1280*960 7 img/sec sphere (40 000 Polys) listener model UC util = 100% 640*480 7 img/sec UC util = 100% 1280*960 7 img/sec I couldn't notice a performance increase and the result appear to be very similar. Too bad... :( I like better the listener model programming way though. I have great expectations using the fullscreen exclusive mode, this should help my fill rate issue...but that will be for tomorow :) Regards, Alban Cousinie |