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

Skip to content

Commit fd07e81

Browse files
authored
Merge pull request #93 from ElieDeBrauwer/patch-2
Clarify location to call vkCmdBindDescriptorSets
2 parents 387e4e5 + 52d170e commit fd07e81

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

05_Uniform_buffers/01_Descriptor_pool_and_sets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,12 @@ as its name implies.
199199
## Using a descriptor set
200200
201201
We now need to update the `createCommandBuffers` function to actually bind the
202-
descriptor set to the descriptors in the shader with `cmdBindDescriptorSets`:
202+
descriptor set to the descriptors in the shader with `cmdBindDescriptorSets`,
203+
this needs to be done before the `vkCmdDrawIndexed` call:
203204
204205
```c++
205206
vkCmdBindDescriptorSets(commandBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, nullptr);
207+
vkCmdDrawIndexed(commandBuffers[i], static_cast<uint32_t>(indices.size()), 1, 0, 0, 0);
206208
```
207209

208210
Unlike vertex and index buffers, descriptor sets are not unique to graphics

0 commit comments

Comments
 (0)