From 3fb884d726910719a351d3e617c757459fb7c772 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Tue, 7 Dec 2021 14:31:55 +0100 Subject: samples --- samples/create_instance/Program.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 samples/create_instance/Program.cs (limited to 'samples/create_instance/Program.cs') diff --git a/samples/create_instance/Program.cs b/samples/create_instance/Program.cs new file mode 100644 index 0000000..474ae72 --- /dev/null +++ b/samples/create_instance/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using Vulkan; +using static Vulkan.Vk; +using Version = Vulkan.Version; + +namespace tests +{ + class Program + { + + static void Main(string[] args) + { + VkInstance instance; + + using (VkApplicationInfo ai = new VkApplicationInfo()) { + using (VkInstanceCreateInfo ci = new VkInstanceCreateInfo {pApplicationInfo = ai}){ + Console.WriteLine (vkCreateInstance (ci, IntPtr.Zero, out instance)); + } + } + + vkDestroyInstance (instance, IntPtr.Zero); + } + } +} -- cgit v1.3.1-4-g156e