Changeset 1abebc1 in opengl-game for sdl-game.cpp
- Timestamp:
- May 19, 2021, 4:49:43 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- c163d81
- Parents:
- a3cefaa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sdl-game.cpp
ra3cefaa r1abebc1 133 133 {{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, 0}, 134 134 {{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f, 0.0f}, 0} 135 })), { 136 0, 1, 2, 3, 4, 5 135 })), 136 { 137 0, 1, 2, 3, 4, 5 137 138 }, { 138 139 mat4(1.0f) 139 } , storageBuffers_modelPipeline);140 }); 140 141 141 142 objects_modelPipeline.numObjects++; … … 158 159 }, { 159 160 mat4(1.0f) 160 } , storageBuffers_modelPipeline);161 }); 161 162 162 163 objects_modelPipeline.numObjects++; … … 378 379 {{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}, {0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, 0}, 379 380 {{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 0.0f, 0.0f}, 0} 380 })), { 381 0, 1, 2, 3, 4, 5 381 })), 382 { 383 0, 1, 2, 3, 4, 5 382 384 }, { 383 385 mat4(1.0f) 384 } , storageBuffers_modelPipeline);386 }); 385 387 386 388 objects_modelPipeline.numObjects++; … … 462 464 // TODO: Probably move the resizing to the VulkanBuffer class 463 465 if (objects_modelPipeline.numObjects > objects_modelPipeline.capacity) { 464 resizeStorageBufferSet(storageBuffers_modelPipeline, objects_modelPipeline, modelPipeline, resourceCommandPool, 465 graphicsQueue); 466 // TODO: Also resize the dynamic ubo 467 resizeBufferSet(storageBuffers_modelPipeline, objects_modelPipeline, modelPipeline, resourceCommandPool, 468 graphicsQueue); 466 469 } 467 470 468 471 for (size_t i = 0; i < modelObjects.size(); i++) { 469 472 if (modelObjects[i].modified) { 470 updateObject(modelObjects, modelPipeline, i); 471 updateStorageBuffer(storageBuffers_modelPipeline, i, modelObjects[i].ssbo); 473 updateObject(modelObjects[i]); 474 updateBufferSet(storageBuffers_modelPipeline, i, modelObjects[i].ssbo); 475 472 476 } 473 477 }
Note:
See TracChangeset
for help on using the changeset viewer.