You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 02_Development_environment.md
+18-38Lines changed: 18 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,7 @@ separately here.
7
7
## Windows
8
8
9
9
If you're developing for Windows, then I will assume that you are using Visual
10
-
Studio 2013 or 2015 to compile your code. The steps are the same for both
11
-
versions, but the Vulkan SDK currently only includes debug symbols that are
12
-
compatible with Visual Studio 2013. That isn't really a problem in practice, but
13
-
it's something that you may wish to take into account.
10
+
Studio 2017 to compile your code. You may also use Visual Studio 2013 or 2015, but the steps may be a bit different.
14
11
15
12
### Vulkan SDK
16
13
@@ -29,7 +26,7 @@ be useful to you.
29
26
Proceed through the installation and pay attention to the install location of
30
27
the SDK. The first thing we'll do is verify that your graphics card and driver
31
28
properly support Vulkan. Go to the directory where you installed the SDK, open
32
-
the `Bin32` directory and run the `cube.exe` demo. You should see the following:
29
+
the `Bin` directory and run the `cube.exe` demo. You should see the following:
33
30
34
31

35
32
@@ -38,18 +35,11 @@ include the Vulkan runtime and that your graphics card is supported. See the
38
35
[introduction chapter](!Introduction) for links to drivers from the major
39
36
vendors.
40
37
41
-
There are two other programs in this directory that will be useful for
42
-
development. The `vkjson_info.exe` program generates a JSON file with a detailed
43
-
description of the capabilities of your hardware when using Vulkan. If you are
44
-
wondering what support is like for extensions and other optional features among
45
-
the graphics cards of your end users, then you can use [this website](http://vulkan.gpuinfo.org/)
46
-
to view the results of a wide range of GPUs.
47
-
48
-
The `glslangValidator.exe` program will be used to compile shaders from the
38
+
There is another program in this directory that will be useful for development. The `glslangValidator.exe` program will be used to compile shaders from the
49
39
human-readable [GLSL](https://en.wikipedia.org/wiki/OpenGL_Shading_Language) to
50
40
bytecode. We'll cover this in depth in the [shader modules](!Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules)
51
-
chapter. The `Bin32` directory also contains the binaries of the Vulkan loader
52
-
and the validation layers, while the `Lib32` directory contains the libraries.
41
+
chapter. The `Bin` directory also contains the binaries of the Vulkan loader
42
+
and the validation layers, while the `Lib` directory contains the libraries.
53
43
54
44
The `Doc` directory contains useful information about the Vulkan SDK and an
55
45
offline version of the entire Vulkan specification. Lastly, there's the
@@ -68,9 +58,9 @@ it also abstracts away some of the other platform-specific things in Vulkan
68
58
besides just window creation.
69
59
70
60
You can find the latest release of GLFW on the [official website](http://www.glfw.org/download.html).
71
-
In this tutorial we'll be using the 32-bit binaries, but you can of course also
72
-
choose to build in 64 bit mode. In that case make sure to link with the Vulkan
73
-
SDK binaries in the `Bin` directory. After downloading it, extract the archive
61
+
In this tutorial we'll be using the 64-bit binaries, but you can of course also
62
+
choose to build in 32 bit mode. In that case make sure to link with the Vulkan
63
+
SDK binaries in the `Lib32` directory instead of `Lib`. After downloading it, extract the archive
74
64
to a convenient location. I've chosen to create a `Libraries` directory in the
75
65
Visual Studio directory under documents.
76
66
@@ -95,16 +85,15 @@ Now that you've installed all of the dependencies we can set up a basic Visual
95
85
Studio project for Vulkan and write a little bit of code to make sure that
96
86
everything works.
97
87
98
-
Start Visual Studio and create a new C++ Win32 project.
88
+
Start Visual Studio and create a new `Windows Desktop Wizard`project by entering a name and pressing `OK`.
99
89
100
90

101
91
102
-
Click `Next`, select `Console application` as application type and make sure
103
-
that `Empty project` is checked.
92
+
Make sure that `Console Application (.exe)` is selected as application type so that we have a place to print debug messages to, and check `Empty Project` to prevent Visual Studio from adding boilerplate code.
104
93
105
94

106
95
107
-
Press `Finish` to create the project and add a C++ source file. You should
96
+
Press `OK` to create the project and add a C++ source file. You should
108
97
already know how to do that, but the steps are included here for completeness.
109
98
110
99

@@ -170,7 +159,7 @@ Add the header directories for Vulkan, GLFW and GLM:
170
159
171
160

172
161
173
-
Next, open the editor for library directories:
162
+
Next, open the editor for library directories under `Linker -> General`:
174
163
175
164

176
165
@@ -190,6 +179,10 @@ Enter the names of the Vulkan and GLFW object files:
190
179
You can now close the project properties dialog. If you did everything right
191
180
then you should no longer see any more errors being highlighted in the code.
192
181
182
+
Finally, ensure that you are actually compiling in 64 bit mode:
183
+
184
+

185
+
193
186
Press `F5` to compile and run the project and you should see a command prompt
194
187
and a window pop up like this:
195
188
@@ -464,23 +457,10 @@ You can now use this directory as a template for your Vulkan projects. Make a
464
457
copy, rename it to something like `HelloTriangle` and remove all of the code
465
458
in `main.cpp`.
466
459
467
-
Before we move on, let's explore the Vulkan SDK a bit more. There are two
468
-
programs in it that will be very useful for development. The
469
-
`x86_64/bin/vkjson_info` program generates a JSON file with a detailed
470
-
description of the capabilities of your hardware when using Vulkan. If you are
471
-
wondering what support is like for extensions and other optional features among
472
-
the graphics cards of your end users, then you can use [this website](http://vulkan.gpuinfo.org/)
473
-
to view the results of a wide range of GPUs. This program needs to be run with
474
-
the same `LD_LIBRARY_PATH` variable as your own programs:
475
-
476
-
```bash
477
-
LD_LIBRARY_PATH=../lib ./vkjson_info
478
-
```
479
-
480
-
The `x86_64/bin/glslangValidator` program will be used to compile shaders from
460
+
Before we move on, let's explore the Vulkan SDK a bit more. There is another program in it that will be very useful for development. The `x86_64/bin/glslangValidator` program will be used to compile shaders from
481
461
the human-readable [GLSL](https://en.wikipedia.org/wiki/OpenGL_Shading_Language)
482
462
to bytecode. We'll cover this in depth in the [shader modules](!Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules)
483
-
chapter. It does not depend on the Vulkan library.
463
+
chapter.
484
464
485
465
The `Doc` directory contains useful information about the Vulkan SDK and an
486
466
offline version of the entire Vulkan specification. Feel free to explore the
Copy file name to clipboardExpand all lines: 03_Drawing_a_triangle/01_Presentation/01_Swap_chain.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -556,7 +556,7 @@ void cleanup() {
556
556
}
557
557
```
558
558
559
-
Now run the application to ensure that the swap chain is created successfully!
559
+
Now run the application to ensure that the swap chain is created successfully! If at this point you get an access violation error in `vkCreateSwapchainKHR`, then see the [FAQ entry](!FAQ) about the Steam overlay layer.
560
560
561
561
Try removing the `createInfo.imageExtent = extent;` line with validation layers
562
562
enabled. You'll see that one of the validation layers immediately catches the
0 commit comments