diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-12-07 03:51:58 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-12-07 03:51:58 +0100 |
| commit | 2af048902ea6952eaac368b8880788214f2e95af (patch) | |
| tree | 00e0e958232227f9a8b750c2cbaa19c1f5a3a279 /tests/Program.cs | |
| parent | 6571d8e5bfc0593afb466e2fced7a2db43bc13e2 (diff) | |
tell rewriter to set the stype property to ensure it's always the good one
Diffstat (limited to 'tests/Program.cs')
| -rw-r--r-- | tests/Program.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/Program.cs b/tests/Program.cs index 0a3d501..1e431fd 100644 --- a/tests/Program.cs +++ b/tests/Program.cs @@ -18,22 +18,24 @@ namespace tests using (VkApplicationInfo ai = new VkApplicationInfo( new Version (1,0,0), new Version (1,0,0), - new Version (1,2,0)) {pApplicationName = "new application name"}){ + new Version (1,2,0)) { + pApplicationName = "new application name" + }){ VkClearColorValue clear = new VkClearColorValue(255,0,0); clear.floats[2] = 210; - VkInstanceCreateInfo ci = VkInstanceCreateInfo.New(); - ci.pApplicationInfo = ai; + using (VkInstanceCreateInfo ci = new VkInstanceCreateInfo() { + pApplicationInfo = ai}){ - VkResult res = vkCreateInstance (ref ci, IntPtr.Zero, out instance); - if (res != VkResult.Success) { - Console.WriteLine ($"Error: {res}"); - return; - }else - Console.WriteLine ($"Success: {res}"); + VkResult res = vkCreateInstance (ci, IntPtr.Zero, out instance); + if (res != VkResult.Success) { + Console.WriteLine ($"Error: {res}"); + return; + }else + Console.WriteLine ($"Success: {res}"); - ci.Dispose(); + } } vkDestroyInstance (instance, IntPtr.Zero); |