File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff 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+
5559Lastly, 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
You can’t perform that action at this time.
0 commit comments