Пример #1
0
        public static VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow window, VkAllocationCallbacks pAllocator, out VkSurfaceKHR surface)
        {
            VkWin32SurfaceCreateInfoKHR pCreateInfo = new VkWin32SurfaceCreateInfoKHR();

            pCreateInfo.sType = VkStructureType.VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
            pCreateInfo.hwnd  = window.GetHandle().Handle;
            return(Vulkan.vkCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, out surface));
        }
Пример #2
0
        public static void EventLoop(GLFWwindow window, Action <GLFWLoop> loopCode)
        {
            GLFWLoop loop = new GLFWLoop();

            GameLoop.Run(
                window.GetHandle(),
                () => !(loop.m_BreakLoop || window.ShouldClose),
                () => loopCode(loop)
                );
        }
Пример #3
0
 public static void EventLoop(GLFWwindow window, Action loopCode)
 {
     GameLoop.Run(window.GetHandle(), () => !window.ShouldClose, loopCode);
 }