Skip to content

Commit

Permalink
Some formatting in WebGPUTriangle to fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Nov 3, 2022
1 parent 960be3f commit 6659d20
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Lab/Experiments/WebGPUTriangle/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static unsafe class Program
{
// ReSharper disable once InconsistentNaming
private static WebGPU wgpu = null!;
private static WebGPUDisposal? webGpuDisposal = null!;
private static WebGPUDisposal _WebGpuDisposal = null!;
private static IWindow? _Window;

private static Surface* _Surface;
Expand Down Expand Up @@ -71,7 +71,7 @@ private static void WindowOnLoad()
{
wgpu = WebGPU.GetApi();

webGpuDisposal = new WebGPUDisposal(wgpu);
_WebGpuDisposal = new WebGPUDisposal(wgpu);

_Surface = _Window.CreateWebGPUSurface(wgpu);

Expand Down Expand Up @@ -207,11 +207,11 @@ private static void WindowOnLoad()

private static void WindowClosing()
{
webGpuDisposal.Dispose(_Shader);
webGpuDisposal.Dispose(_Pipeline);
webGpuDisposal.Dispose(_Device);
webGpuDisposal.Dispose(_Adapter);
webGpuDisposal.Dispose(_Surface);
_WebGpuDisposal.Dispose(_Shader);
_WebGpuDisposal.Dispose(_Pipeline);
_WebGpuDisposal.Dispose(_Device);
_WebGpuDisposal.Dispose(_Adapter);
_WebGpuDisposal.Dispose(_Surface);

wgpu.Dispose();
}
Expand Down Expand Up @@ -287,7 +287,7 @@ private static void WindowOnRender(double delta)
wgpu.RenderPassEncoderSetPipeline(renderPass, _Pipeline);
wgpu.RenderPassEncoderDraw(renderPass, 3, 1, 0, 0);
wgpu.RenderPassEncoderEnd(renderPass);
webGpuDisposal.Dispose(nextTexture);
_WebGpuDisposal.Dispose(nextTexture);

var queue = wgpu.DeviceGetQueue(_Device);

Expand Down

0 comments on commit 6659d20

Please sign in to comment.