Content


NTL
Core
CStoreVertexArray

CStoreVertexArray


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

Instead of using code like below

IVertexArray *old_va{ renderer->ActiveVertexArray };
...
// Change active vertex array in renderer 
...
renderer->ActivateVertexArray(old_va);

you may shorten it to the following one.

CStoreVertexArray store{ renderer };
...
// Change active vertex array in renderer 
...
class CStoreVertexArray final
{
public:
    CStoreVertexArray(IRenderer *renderer);
    ~CStoreVertexArray();
};
Namespace: nitisa
Include: Nitisa/Render/StoreVertexArray.h