/// <summary> /// Initialize the window system /// </summary> public static void Init() { // Don't allow initializing twice if (Initialized) { throw new InvalidOperationException("WyvernWindow is already initialized"); } // Initialize VkGLFW3 VkGlfw.Init(); // Check for Vulkan availability if (!VkGlfw.VulkanSupported) { throw new PlatformNotSupportedException("Vulkan unsupported on this machine!"); } // Signal that we are initialized Initialized = true; }
static void Main(string[] args) { VkGlfw.Init(); var window = new Window(800, 600, "VkGLFW3 Demo"); Console.WriteLine("Window size: {0}", window.GetSize()); Console.WriteLine("Window title: {0}", window.Title); Console.WriteLine("Vulkan supported: {0}", VkGlfw.VulkanSupported); Console.WriteLine("Required Vulkan instance extensions: {0}", string.Join(", ", VkGlfw.RequiredInstanceExtensions)); window.Title = "Test"; while (!window.ShouldClose) { window.PollEvents(); } window.Dispose(); VkGlfw.Terminate(); }