CStoreTarget


This helper class provides shorter alternative for saving and restoring active render target in renderer.

Instead of using code like below

ITexture *old_target{ renderer->ActiveTarget };
...
// Change active render target in renderer 
...
renderer->ActivateTarget(old_target);

you may shorten it to the following one.

CStoreTarget store{ renderer };
...
// Change active render target in renderer 
...
class CStoreTarget final
{
public:
    CStoreTarget(IRenderer *renderer);
    ~CStoreTarget();
};
Namespace: nitisa
Include: Nitisa/Render/StoreTarget.h