Remove GraphicsDevice.Default property and APIs

このコミットが含まれているのは:
Sergio Pedri committed 2022-07-31 23:26:11 +02:00
1 親 ea0f792ae6
コミット 4e5acba69c
19ファイル変更
+67 -115

検索条件に一致するファイルはありません

+3 -3
ファイルの表示
@@ -90,7 +90,7 @@ internal sealed class SwapChainApplication<T> : Win32Application
// Get the underlying ID3D12Device in use
fixed (ID3D12Device** d3D12Device = this.d3D12Device)
{
_ = InteropServices.TryGetID3D12Device(GraphicsDevice.Default, Windows.__uuidof<ID3D12Device>(), (void**)d3D12Device);
_ = InteropServices.TryGetID3D12Device(GraphicsDevice.GetDefault(), Windows.__uuidof<ID3D12Device>(), (void**)d3D12Device);
}
// Create the direct command queue to use
@@ -217,7 +217,7 @@ internal sealed class SwapChainApplication<T> : Win32Application
D3D12_RESOURCE_DESC d3D12Resource0Description = this.d3D12Resource0.Get()->GetDesc();
// Create the 2D texture to use to generate frames to display
this.texture = GraphicsDevice.Default.AllocateReadWriteTexture2D<Rgba32, float4>(
this.texture = GraphicsDevice.GetDefault().AllocateReadWriteTexture2D<Rgba32, float4>(
(int)d3D12Resource0Description.Width,
(int)d3D12Resource0Description.Height);
}
@@ -233,7 +233,7 @@ internal sealed class SwapChainApplication<T> : Win32Application
}
// Generate the new frame
GraphicsDevice.Default.ForEach(this.texture!, this.shaderFactory(time));
GraphicsDevice.GetDefault().ForEach(this.texture!, this.shaderFactory(time));
using ComPtr<ID3D12Resource> d3D12Resource = default;
+1 -1
ファイルの表示
@@ -77,6 +77,6 @@ class Program
{
string filename = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Textures", $"{name}.png");
return GraphicsDevice.Default.LoadReadOnlyTexture2D<Rgba32, float4>(filename);
return GraphicsDevice.GetDefault().LoadReadOnlyTexture2D<Rgba32, float4>(filename);
}
}