Path Matrix Caching

As mentioned many times already, OpenGL 3.1 is eliminating the matrix manipulation code from the OpenGL API.  OpenGLContext/PyVRML97 already had a matrix-calculation mechanism, but it wasn't used for rendering anything, it was just used for certain bookkeeping operations.

To make it practical to use the matrices for rendering they need to be cached.  I'm eventually thinking of using recalculation information on the cache to do partial resolutions, so that if you have a top-level node that does lots of transformation changes, the matrices would cache partial solutions and multiply with the rapidly-changing values.  For now, however, I'm using straightforward cache invalidations so that if a top-level node changes its matrix all its children will also recalculate their matrices.

I'm thinking I'll move a lot of the bookkeeping/geometry code from OpenGLContext to PyVRML97, things like quaternions, automatic normal calculation, vector manipulations and the like.  It's all just simple Numpy/Numeric code and doesn't actually require the OpenGLContext rendering stuff.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.