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

Skip to content

Commit ce2473e

Browse files
authored
Update 00_Window_surface.md
1 parent da1bff0 commit ce2473e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ behind the scenes before we start relying on it.
4545
Because a window surface is a Vulkan object, it comes with a
4646
`VkWin32SurfaceCreateInfoKHR` struct that needs to be filled in. It has two
4747
important parameters: `hwnd` and `hinstance`. These are the handles to the
48-
window and the process.
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.
51+
52+
```#define GLFW_INCLUDE_VULKAN
53+
#include <GLFW/glfw3.h>
54+
```
55+
56+
now we can create our surface.
4957

5058
```c++
5159
VkWin32SurfaceCreateInfoKHR createInfo{};

0 commit comments

Comments
 (0)