aboutsummaryrefslogtreecommitdiffstatsci
path: root/tests/Program.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-02 08:35:09 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-02 08:35:09 +0100
commit7c27042d45798225306dfbc677640ea2701f8e1a (patch)
treee802c4333b8aada3db4d2f88dc23e5aec2910553 /tests/Program.cs
parent4a39db4c1d61907188a411d4db73033f77fc4813 (diff)
some docs, build dependecies, netcoreapp3.1 for tools and test
Diffstat (limited to 'tests/Program.cs')
-rw-r--r--tests/Program.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/Program.cs b/tests/Program.cs
new file mode 100644
index 0000000..dcbdd2a
--- /dev/null
+++ b/tests/Program.cs
@@ -0,0 +1,34 @@
+using System;
+using Vulkan;
+using static Vulkan.Vk;
+using Version = Vulkan.Version;
+
+namespace tests
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ VkInstance instance;
+
+ VkInstanceCreateInfo ci = VkInstanceCreateInfo.New();
+ VkApplicationInfo ai = VkApplicationInfo.New();
+ //ai.apiVersion = new Version (1,0,0);
+ //ai.applicationVersion = new Version (1,0,0);
+
+ using (PinnedObjects pi = new PinnedObjects()) {
+ ci.pApplicationInfo = ai.Pin(pi);
+
+ VkResult res = vkCreateInstance (ref ci, IntPtr.Zero, out instance);
+ if (res != VkResult.Success) {
+ Console.WriteLine ($"Error: {res}");
+ return;
+ }else
+ Console.WriteLine ($"Success: {res}");
+
+ }
+
+ vkDestroyInstance (instance, IntPtr.Zero);
+ }
+ }
+}