The Renderer class is responsible for the every-frame rendering performed by the FlatRedBall engine. By default the Renderer automatically performs drawing through the FlatRedBallServices.Draw method.
For information on using FlatRedBall with render targets, see this page.
LastFrameRenderBreakList is a list of RenderBreaks which were created last frame. For this to be a non-null list, the Renderer's RecordRenderBreaks value must be set to true. This is by default false for performance reasons.
This member can be used to get detailed information about the last frame's render breaks. To simply count the number of render breaks, use the RenderBreaksAllocatedThisFrame property. This property is always valid.
The following code will measure the render breaks.
The Draw function is responsible for looping through all Cameras in FlatRedBall and performing rendering for each one. This method is automatically called for you in a default template, so most games do not require manually calling this method.
The Renderer's Draw method is usually called by the . You can modify the game code where is called to customize how rendering occurs (such as to do custom render targets). For more information, see
The RenderBreaksAllocatedThisFrame property returns how many render breaks have been created and applied during the last rendering pass. Render breaks can significantly slow down the performance of your game, and reducing the number of render breaks occurring in each render pass can provide big performance boosts without requiring you to reduce the number of objects in your game.
For a detailed discussion of render breaks, see this page.