Quality Time with PyOpenGL

Spent some quality time this evening with PyOpenGL, OpenGLContext and KCacheGrind.  Quite a few tiny improvements in the code-base.  I'm still just picking out little bits of fluff that are "wrong" as they show up in the profiling.  There was ~4% of total run-time on this machine spent in Python's warnings.warn() function because there was a deprecated Numpy method getting used.  There were also a number of cases where big index arrays were getting copied for no reason.

At some point I should set up a repeatable script to run a world under the profiler to get better run vs run metrics.  That would let me work on the finer grain stuff... but then right now most of the stuff is pretty coarse-grained that I'm finding.  Frame rate went from approximately 4fps to 7.5fps on this machine with just tonight's fixes.  Still, there's only so many of those types of things left, there are some things I just can't optimize away in Python, and still others that I probably can't optimize away even in C.  I'd like to get the scenegraph to the point of showing this world at at least 30fps, but that's likely not going to happen without doing a lot more on the C side.

Wrapped the OpenGL 1.5 non-extension occlusion_query functionality.  ARB/Core occlusion query is interesting compared to the old HP stuff as it allows you to queue up large numbers of queries and then access them later... doesn't fit with my current render-pass setup very well, but it does look like it would be helpful for "flatter" scenes.


Comments are closed.


Pingbacks are closed.