Content


NTL
Core
CStoreMask

CStoreMask


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

Instead of using code like below

ITexture *old_mask{ renderer->ActiveMask };
...
// Change active mask in renderer 
...
renderer->ActivateMask(old_mask);

you may shorten it to the following one.

CStoreMask store{ renderer };
...
// Change active mask in renderer 
...
class CStoreMask final
{
public:
    CStoreMask(IRenderer *renderer);
    ~CStoreMask();
};
Namespace: nitisa
Include: Nitisa/Render/StoreMask.h