Tuesday, December 8, 2009

Optimization

Today I've been working a bit on the Scene manager code that is responsible for ticking, and rendering everything in the scene.

I have added a few simple optimizations that prevent off-screen objects from rendering and give objects in the scene a chance to have a "low power" tick function that is called when they are far enough off screen that they won't be seen in a few frames. This allows for a "rest" state to be achieved for power consuming objects like physics objects and water.

To facilitate these changes the Animation code needed to be extended to import bounding frames from the models which define the maximum area that the animation may take up. The Scene manager uses these frames to determine when something is on screen or not.

No comments:

Post a Comment