Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 93ce448 + 86a80c7 commit 1936157Copy full SHA for 1936157
1 file changed
en/03_Drawing_a_triangle/01_Presentation/00_Window_surface.md
@@ -42,6 +42,16 @@ platform-specific code anyway. GLFW actually has `glfwCreateWindowSurface` that
42
handles the platform differences for us. Still, it's good to see what it does
43
behind the scenes before we start relying on it.
44
45
+To access native platform functions, you need to update the includes at the top:
46
+
47
+```c++
48
+#define VK_USE_PLATFORM_WIN32_KHR
49
+#define GLFW_INCLUDE_VULKAN
50
+#include <GLFW/glfw3.h>
51
+#define GLFW_EXPOSE_NATIVE_WIN32
52
+#include <GLFW/glfw3native.h>
53
+```
54
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
0 commit comments