OGRE-Next  3.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::LoadAction Namespace Reference

Enumerations

enum  LoadAction { DontCare , Clear , ClearOnTilers , Load }
 

Enumeration Type Documentation

◆ LoadAction

Enumerator
DontCare 

Do not care about the initial contents.

Useful for colour buffers if you intend to cover the whole screen with opaque draws. Not recommended for depth & stencil.

Clear 

Clear the whole resource or a fragment of it depending on viewport settings.

Actual behavior depends on the API used.

ClearOnTilers 

On tilers, will clear the subregion.

On non-tilers, it's the same as LoadAction::Load and assumes the resource is already cleared.

Remarks
This is useful for shadow map atlases. On desktop you probably want to render to a 8192x8192 shadow map in the following way: clear( 0, 0, 8192, 8192 ); foreach( shadowmap in shadowmaps ) render( shadowmap.x, shadowmap.y, shadowmap.width, shadowmap.height );

However this is heavily innefficient for tilers. In tilers you probably want to do the following: foreach( shadowmap in shadowmaps ) clear( shadowmap.x, shadowmap.y, shadowmap.width, shadowmap.height ); render( shadowmap.x, shadowmap.y, shadowmap.width, shadowmap.height );

ClearOnTilers allows you to perform the most efficient shadow map rendering on both tilers & non-tilers using the same compositor script, provided the full clear pass was set to only execute on non-tilers.

Load 

Load the contents that were stored in the texture.