Skip to content

Commit a03dc9c

Browse files
committed
Minor adjustments to match code (cpp and Slang)
1 parent c3cb2fa commit a03dc9c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

en/07_Depth_buffering.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ struct Vertex {
3333
};
3434
----
3535

36-
Next, update the vertex shader to accept and transform 3D coordinates as input.
37-
Remember to recompile it afterward!
36+
Next, update the vertex shader to accept and transform 3D coordinates as input by changing the type for `inPosition` from `float2` to `float3`:
3837

3938
[,glsl]
4039
----
41-
float3 inPosition;
40+
struct VSInput {
41+
float3 inPosition;
42+
...
43+
};
4244
4345
...
4446
@@ -52,6 +54,8 @@ VSOutput vertMain(VSInput input) {
5254
}
5355
----
5456

57+
Remember to recompile the shader afterwards!
58+
5559
Lastly, update the `vertices` container to include Z coordinates:
5660

5761
[,c++]
@@ -454,14 +458,12 @@ void recreateSwapChain() {
454458
glfwWaitEvents();
455459
}
456460
457-
vkDeviceWaitIdle(device);
461+
device.waitIdle(device);
458462
459463
cleanupSwapChain();
460-
461464
createSwapChain();
462465
createImageViews();
463466
createDepthResources();
464-
createFramebuffers();
465467
}
466468
----
467469

0 commit comments

Comments
 (0)