April 2017
Intermediate to advanced
700 pages
21h 36m
English
Drawing is performed with a call of the vkCmdDraw() function:
vkCmdDraw( command_buffer, vertex_count, instance_count, first_vertex, first_instance );
It allows us to draw any number of vertices, where vertices (and their attributes) are stored one after another in a vertex buffer (no index buffer is used). During the call we need to provide an offset--the number of the first vertex from which drawing should be started. This can be used when we have multiple models stored in one vertex buffer (for example, compounds of a model) and we want to draw only one of them.
The preceding function allows us to draw a single mesh (model), and also multiple instances of the same mesh. This is particularly useful when we have specified ...
Read now
Unlock full access