Added missing buffer allocation extension

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-30 14:02:33 +01:00
1 親 b22c7d99a1
コミット 48a717f596
1ファイル変更
+14
+14
ファイルの表示
@@ -11,6 +11,20 @@ namespace ComputeSharp
/// </summary>
public static class GraphicsDeviceExtensions
{
/// <summary>
/// Allocates a new constant buffer with the specified parameters.
/// </summary>
/// <typeparam name="T">The type of items to store in the buffer.</typeparam>
/// <param name="device">The <see cref="GraphicsDevice"/> instance to use to allocate the buffer.</param>
/// <param name="length">The length of the buffer to allocate.</param>
/// <returns>A zeroed <see cref="ConstantBuffer{T}"/> instance of size <paramref name="length"/>.</returns>
[Pure]
public static ConstantBuffer<T> AllocateConstantBuffer<T>(this GraphicsDevice device, int length)
where T : unmanaged
{
return new(device, length);
}
/// <summary>
/// Allocates a new constant buffer with the specified parameters.
/// </summary>