diff --git a/Graphics/GraphicsTools/interface/VertexPool.h b/Graphics/GraphicsTools/interface/VertexPool.h index b82640e3c..e8a8531f7 100644 --- a/Graphics/GraphicsTools/interface/VertexPool.h +++ b/Graphics/GraphicsTools/interface/VertexPool.h @@ -194,6 +194,10 @@ struct IVertexPool : public IObject /// access. virtual IBuffer* Update(Uint32 Index, IRenderDevice* pDevice, IDeviceContext* pContext) = 0; + /// Updates all internal buffers. + /// + /// \remarks This method is equivalent to calling Update() for each internal buffer. + virtual void UpdateAll(IRenderDevice* pDevice, IDeviceContext* pContext) = 0; /// Returns a pointer to the internal buffer at the given index. /// diff --git a/Graphics/GraphicsTools/src/VertexPool.cpp b/Graphics/GraphicsTools/src/VertexPool.cpp index 7349ee5cb..c77a25d5b 100644 --- a/Graphics/GraphicsTools/src/VertexPool.cpp +++ b/Graphics/GraphicsTools/src/VertexPool.cpp @@ -220,6 +220,12 @@ class VertexPoolImpl final : public ObjectBase return Buffer.Update(pDevice, pContext); } + virtual void UpdateAll(IRenderDevice* pDevice, IDeviceContext* pContext) override final + { + for (Uint32 i = 0; i < m_Buffers.size(); ++i) + Update(i, pDevice, pContext); + } + virtual IBuffer* GetBuffer(Uint32 Index) const override final { if (Index >= m_Buffers.size())