Table of Contents | ||
|
||
RenderScene | ||
Purpose Renders the various objects in the scene |
||
Protoype void CSceneMngr::RenderScene () |
||
Description This function renders the objects in the sceen onto the screen. It is very important to understand the mechanics of this function, however, because how you build your scenes will affect the performance of the scene. For each scene object, the function will have to make a call to that object's rendering function. In order to optomize and reduce the number of function calls to various object rendering functions, it is best to group together as much of the same object type as possible. This is because the function will iterate through the layers list and store all similar objects together. When it hits a different object type, the batch of similar objects will be sent to their render function to be rendered all at once, saving the overhead of multiple function calls. Moral of the story - try and group together as many similar objects as possible in your scenes for optimal rendering performance. |
||
Use CSceneMngr scene; scene.RenderScene(); |
||
|
||
|