Added missing buffer allocation extension
このコミットが含まれているのは:
1 親
b22c7d99a1
コミット
48a717f596
1ファイル変更
+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>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする