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

Skip to content

Commit 8092ec2

Browse files
committed
Add missing step for createShaderModule
1 parent a9f8a0b commit 8092ec2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

03_Drawing_a_triangle/02_Graphics_pipeline_basics/01_Shader_modules.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,12 @@ if (vkCreateShaderModule(device, &createInfo, nullptr, &shaderModule) != VK_SUCC
387387
The parameters are the same as those in previous object creation functions: the
388388
logical device, pointer to create info structure, optional pointer to custom
389389
allocators and handle output variable. The buffer with the code can be freed
390-
immediately after creating the shader module.
390+
immediately after creating the shader module. Don't forget to return the created
391+
shader module:
392+
393+
```c++
394+
return shaderModule;
395+
```
391396

392397
The shader module objects are only required during the pipeline creation
393398
process, so instead of declaring them as class members, we'll make them local

0 commit comments

Comments
 (0)