diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-09-27 17:38:20 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-09-29 11:37:05 -0300 |
commit | d7d79214a93bc96b38ac018aad4c8d5ee88d51ca (patch) | |
tree | 25528c9bd91556f3d1d5d35a5d2c52d3d7d8a5a8 /src/vk/graphics_pipeline_3d.cpp | |
parent | 28de1fe8713aba2c4bb23fc8640adb2747373b66 (diff) |
feat Allow multiple textures to be used with the same mesh
Diffstat (limited to 'src/vk/graphics_pipeline_3d.cpp')
-rw-r--r-- | src/vk/graphics_pipeline_3d.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp index eb86401..f3a54e7 100644 --- a/src/vk/graphics_pipeline_3d.cpp +++ b/src/vk/graphics_pipeline_3d.cpp @@ -566,7 +566,7 @@ GraphicsPipeline3D::draw( this->descriptor_sets_world[image_index], view->descriptor_sets_3d[image_index], model->descriptor_sets[image_index]}; - VkBuffer vertex_buffers[]{model->vertex_buffer->buffer}; + VkBuffer vertex_buffers[]{model->mesh->vertex_buffer->buffer}; VkDeviceSize offsets[]{0}; vkCmdBindDescriptorSets( @@ -579,10 +579,11 @@ GraphicsPipeline3D::draw( vkCmdBindVertexBuffers( draw_command_buffer, 0, 1, vertex_buffers, offsets); vkCmdBindIndexBuffer( - draw_command_buffer, model->index_buffer->buffer, 0, + draw_command_buffer, model->mesh->index_buffer->buffer, 0, VK_INDEX_TYPE_UINT32); vkCmdDrawIndexed( - draw_command_buffer, model->index_count, instances.size(), 0, 0, 0); + draw_command_buffer, model->mesh->index_count, instances.size(), + 0, 0, 0); } VK::UBOModelInstance ubo_model_instance; |