add Size property to Buffer

pull/17/head
cosmonaut 2022-03-03 17:18:38 -08:00
parent 17333cfb67
commit a413863cf9
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,11 @@ namespace MoonWorks.Graphics
{
protected override Action<IntPtr, IntPtr> QueueDestroyFunction => Refresh.Refresh_QueueDestroyBuffer;
/// <summary>
/// Size in bytes.
/// </summary>
public uint Size { get; }
/// <summary>
/// Creates a buffer of appropriate size given a type and element count.
/// </summary>
@ -49,6 +54,7 @@ namespace MoonWorks.Graphics
(Refresh.BufferUsageFlags) usageFlags,
sizeInBytes
);
Size = sizeInBytes;
}
/// <summary>