ファイル
ComputeSharp/src/DirectX12GameEngine.Graphics/Buffers/Buffer.Constant.cs
T
2019-08-11 02:27:22 +02:00

26 行
964 B
C#

using System;
namespace DirectX12GameEngine.Graphics.Buffers
{
public partial class Buffer
{
public static class Constant
{
public static unsafe Buffer New(GraphicsDevice device, int size, GraphicsHeapType heapType = GraphicsHeapType.Upload)
{
return Buffer.New(device, size, BufferFlags.ConstantBuffer, heapType);
}
public static unsafe Buffer<T> New<T>(GraphicsDevice device, in T data, GraphicsHeapType heapType = GraphicsHeapType.Upload) where T : unmanaged
{
return Buffer.New(device, data, BufferFlags.ConstantBuffer, heapType);
}
public static unsafe Buffer<T> New<T>(GraphicsDevice device, Span<T> data, GraphicsHeapType heapType = GraphicsHeapType.Upload) where T : unmanaged
{
return Buffer.New(device, data, BufferFlags.ConstantBuffer, heapType);
}
}
}
}