Changeset 67527a5 in opengl-game for sdl-game.cpp
- Timestamp:
- Jun 21, 2021, 4:12:08 PM (3 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 27e580e
- Parents:
- b01b50c
- git-author:
- Dmitry Portnoy <dportnoy@…> (06/21/21 15:13:03)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (06/21/21 16:12:08)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
rb01b50c r67527a5 96 96 deviceProperties.limits.minUniformBufferOffsetAlignment); 97 97 98 objects_modelPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.max StorageBufferRange,99 deviceProperties.limits.min StorageBufferOffsetAlignment);98 objects_modelPipeline = VulkanBuffer<SSBO_ModelObject>(10, deviceProperties.limits.maxUniformBufferRange, 99 deviceProperties.limits.minUniformBufferOffsetAlignment); 100 100 101 101 initImGuiOverlay(); … … 123 123 createBufferSet(objects_modelPipeline.memorySize(), 124 124 VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT 125 | VK_BUFFER_USAGE_ STORAGE_BUFFER_BIT,125 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, 126 126 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, 127 127 objectBuffers_modelPipeline); … … 131 131 modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 132 132 VK_SHADER_STAGE_VERTEX_BIT, &uniformBuffers_modelPipeline.infoSet); 133 modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_ STORAGE_BUFFER,133 modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 134 134 VK_SHADER_STAGE_VERTEX_BIT, &objectBuffers_modelPipeline.infoSet); 135 135 modelPipeline.addDescriptorInfo(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, … … 482 482 } 483 483 484 VulkanUtils::copyDataToMappedMemory(device, uniforms_modelPipeline.data(), uniforms_modelPipeline.mapped(imageIndex), 484 VulkanUtils::copyDataToMappedMemory(device, uniforms_modelPipeline.data(), 485 uniforms_modelPipeline.mapped(imageIndex), 485 486 uniformBuffers_modelPipeline.memory[imageIndex], 486 487 uniforms_modelPipeline.memorySize(), true); 487 488 488 VulkanUtils::copyDataToMappedMemory(device, objects_modelPipeline.data(), objects_modelPipeline.mapped(imageIndex), 489 VulkanUtils::copyDataToMappedMemory(device, objects_modelPipeline.data(), 490 objects_modelPipeline.mapped(imageIndex), 489 491 objectBuffers_modelPipeline.memory[imageIndex], 490 492 objects_modelPipeline.memorySize(), true); … … 1213 1215 // TODO: Find a more elegant, per-screen solution for this 1214 1216 if (currentRenderScreenFn == &VulkanGame::renderGameScreen) { 1215 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { });1217 modelPipeline.createRenderCommands(commandBuffers[imageIndex], imageIndex, { 0 }); 1216 1218 1217 1219 … … 1301 1303 createBufferSet(objects_modelPipeline.memorySize(), 1302 1304 VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT 1303 | VK_BUFFER_USAGE_ STORAGE_BUFFER_BIT,1305 | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, 1304 1306 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, 1305 1307 objectBuffers_modelPipeline);
Note:
See TracChangeset
for help on using the changeset viewer.