From a413863cf94827148dc36580a0313a2013c235ee Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Thu, 3 Mar 2022 17:18:38 -0800 Subject: [PATCH] add Size property to Buffer --- src/Graphics/Resources/Buffer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Graphics/Resources/Buffer.cs b/src/Graphics/Resources/Buffer.cs index 9af312fb..ee90e856 100644 --- a/src/Graphics/Resources/Buffer.cs +++ b/src/Graphics/Resources/Buffer.cs @@ -11,6 +11,11 @@ namespace MoonWorks.Graphics { protected override Action QueueDestroyFunction => Refresh.Refresh_QueueDestroyBuffer; + /// + /// Size in bytes. + /// + public uint Size { get; } + /// /// Creates a buffer of appropriate size given a type and element count. /// @@ -49,6 +54,7 @@ namespace MoonWorks.Graphics (Refresh.BufferUsageFlags) usageFlags, sizeInBytes ); + Size = sizeInBytes; } ///