Changeset 5ea0a37 in opengl-game for vulkan-game.cpp
- Timestamp:
- Jun 11, 2021, 10:05:25 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 90880fb
- Parents:
- 6486ba8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r6486ba8 r5ea0a37 1022 1022 1023 1023 // TODO: Probably move the resizing to the VulkanBuffer class 1024 1025 // TODO: Replace updateBufferSet to one call to copyDataToMemory, using VulkanBuffer to provide the data source1026 1024 // TODO: Figure out a way to make updateDescriptorInfo easier to use, maybe store the binding index in the buffer set 1027 1025 … … 1046 1044 objData.model = obj.model_transform * obj.model_base; 1047 1045 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1048 1049 updateBufferSet(storageBuffers_modelPipeline, i, objData); 1050 } 1046 } 1047 1048 VulkanUtils::copyDataToMemory(device, objects_modelPipeline.data(), storageBuffers_modelPipeline.memory[imageIndex], 1049 0, objects_modelPipeline.memorySize(), false); 1051 1050 1052 1051 if (objects_shipPipeline.resized) { … … 1066 1065 objData.model = obj.model_transform * obj.model_base; 1067 1066 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1068 1069 updateBufferSet(storageBuffers_shipPipeline, i, objData); 1070 } 1067 } 1068 1069 VulkanUtils::copyDataToMemory(device, objects_shipPipeline.data(), storageBuffers_shipPipeline.memory[imageIndex], 1070 0, objects_shipPipeline.memorySize(), false); 1071 1071 1072 1072 if (objects_asteroidPipeline.resized) { … … 1108 1108 objData.model = obj.model_transform * obj.model_base; 1109 1109 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1110 1111 updateBufferSet(storageBuffers_asteroidPipeline, i, objData);1112 1110 } 1113 1111 } 1112 1113 VulkanUtils::copyDataToMemory(device, objects_asteroidPipeline.data(), storageBuffers_asteroidPipeline.memory[imageIndex], 1114 0, objects_asteroidPipeline.memorySize(), false); 1114 1115 1115 1116 if (objects_laserPipeline.resized) { … … 1135 1136 objData.model = obj.model_transform * obj.model_base; 1136 1137 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1137 1138 updateBufferSet(storageBuffers_laserPipeline, i, objData); 1139 } 1138 } 1139 1140 VulkanUtils::copyDataToMemory(device, objects_laserPipeline.data(), storageBuffers_laserPipeline.memory[imageIndex], 1141 0, objects_laserPipeline.memorySize(), false); 1140 1142 1141 1143 if (objects_explosionPipeline.resized) { … … 1160 1162 objData.model = obj.model_transform * obj.model_base; 1161 1163 obj.center = vec3(objData.model * vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1162 1163 updateBufferSet(storageBuffers_explosionPipeline, i, objData); 1164 } 1164 } 1165 1166 VulkanUtils::copyDataToMemory(device, objects_explosionPipeline.data(), storageBuffers_explosionPipeline.memory[imageIndex], 1167 0, objects_explosionPipeline.memorySize(), false); 1165 1168 1166 1169 explosion_UBO.cur_time = curTime;
Note:
See TracChangeset
for help on using the changeset viewer.