Display-listing Materials Speeds Rendering
Written by
on
in
Snaking.
Doing some optimization of the OpenGLContext scenegraph. Just using display-lists on the material objects takes the material rendering overhead from ~5% of runtime to <1% of runtime. There's a diminishing set of low-hanging optimizations available at this point. The wrapper object is obviously a major time-sink. I took a look at re-writing that in C and then realized that mucking about in C just isn't something I want to do. Yes, it's a trivial little extension object, but I don't want to spend my "relaxation" time on programming C. I get enough of that at client sites.
I think I can save around 8% more if I cache the typed children-sets for the traversal code. There's millions of isinstance calls due to the generic form of the traversal code. Just providing a cached set of traversal-types would be a huge win. Would probably also be worth it to cache the paths to special nodes (lights, backgrounds etceteras) with invalidation on "children".
Comments
Comments are closed.
Pingbacks
Pingbacks are closed.
Giovanni Bajo on 11/14/2008 4:11 a.m. #
What about cython instead?
Mike Fletcher on 11/14/2008 10:38 a.m. #
I was thinking of Pyrex, but decided to give Cython a look on your recommendation. Have it down to just 2 hot-spots still on the PyOpenGL side with just a few little objects in almost-Python :) . There's still lots of slow-downs in the scenegraph traversal, but framerate is often hitting 25fps on my test world now (was around 14fps before the accelerator module).