@@ -42,25 +42,20 @@ platform-specific code anyway. GLFW actually has `glfwCreateWindowSurface` that
4242handles the platform differences for us. Still, it's good to see what it does
4343behind the scenes before we start relying on it.
4444
45- Because a window surface is a Vulkan object, it comes with a
46- ` VkWin32SurfaceCreateInfoKHR ` struct that needs to be filled in. It has two
47- important parameters: ` hwnd ` and ` hinstance ` . These are the handles to the
48- window and the process.You need to define VK_USE_PLATFORM_WIN32_KHR before
49- including vulkan header file. Because include vulkan header file we define it
50- before including glfw header. and to use glfwGetWin32Window function we need to
51- include it from glfw3native header file and define GLFW_EXPOSE_NATIVE_WIN32 before
52- it , to make the function available for use.
53-
54- ```
45+ To access native platform functions, you need to update the includes at the top:
5546
47+ ``` c++
5648#define VK_USE_PLATFORM_WIN32_KHR
5749#define GLFW_INCLUDE_VULKAN
5850#include < GLFW/glfw3.h>
5951#define GLFW_EXPOSE_NATIVE_WIN32
6052#include < GLFW/glfw3native.h>
6153```
6254
63- now we can create our surface.
55+ Because a window surface is a Vulkan object, it comes with a
56+ ` VkWin32SurfaceCreateInfoKHR ` struct that needs to be filled in. It has two
57+ important parameters: ` hwnd ` and ` hinstance ` . These are the handles to the
58+ window and the process.
6459
6560``` c++
6661VkWin32SurfaceCreateInfoKHR createInfo{};
0 commit comments