Changeset 567fa88 in opengl-game
- Timestamp:
- Jun 7, 2021, 11:59:27 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- c074f81
- Parents:
- 58453c3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
graphics-pipeline_vulkan.hpp
r58453c3 r567fa88 63 63 void createDescriptorSets(uint32_t size); 64 64 65 void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage); 65 void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage, 66 const vector<uint32_t>& dynamicOffsets); 66 67 67 68 void addObject(const vector<VertexType>& vertices, vector<uint16_t> indices, VkCommandPool commandPool, … … 473 474 474 475 template<class VertexType> 475 void GraphicsPipeline_Vulkan<VertexType>::createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) { 476 void GraphicsPipeline_Vulkan<VertexType>::createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage, 477 const vector<uint32_t>& dynamicOffsets) { 476 478 vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); 477 479 480 // If more dynamic UBOs are added, this needs to become an array of offsets 478 481 vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, 479 &descriptorSets[currentImage], 0, nullptr);482 &descriptorSets[currentImage], dynamicOffsets.size(), dynamicOffsets.data()); 480 483 481 484 VkBuffer vertexBuffers[] = { vertexBuffer }; -
sdl-game.cpp
r58453c3 r567fa88 1177 1177 // TODO: Find a more elegant, per-screen solution for this 1178 1178 if (currentRenderScreenFn == &VulkanGame::renderGameScreen) { 1179 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1179 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1180 1180 1181 1181 -
vulkan-game.cpp
r58453c3 r567fa88 1790 1790 // TODO: Find a more elegant, per-screen solution for this 1791 1791 if (currentRenderScreenFn == &VulkanGame::renderGameScreen) { 1792 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1793 shipPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1794 asteroidPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1795 laserPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1796 explosionPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex );1792 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1793 shipPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1794 asteroidPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1795 laserPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1796 explosionPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, {}); 1797 1797 } 1798 1798
Note:
See TracChangeset
for help on using the changeset viewer.