Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a5edff

Browse files
authored
Update 00_Window_surface.md
1 parent ba33a94 commit 7a5edff

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

en/03_Drawing_a_triangle/01_Presentation/00_Window_surface.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ Because a window surface is a Vulkan object, it comes with a
4747
important parameters: `hwnd` and `hinstance`. These are the handles to the
4848
window and the process.You need to define VK_USE_PLATFORM_WIN32_KHR before
4949
including vulkan header file. Because include vulkan header file we define it
50-
before including glfw header.
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.
5153

5254
```
55+
5356
#define VK_USE_PLATFORM_WIN32_KHR
5457
#define GLFW_INCLUDE_VULKAN
5558
#include <GLFW/glfw3.h>
59+
#define GLFW_EXPOSE_NATIVE_WIN32
60+
#include <GLFW/glfw3native.h>
5661
```
5762

5863
now we can create our surface.

0 commit comments

Comments
 (0)