Changeset 8dcbf62 in opengl-game for vulkan-game.cpp
- Timestamp:
- Jun 8, 2021, 11:19:16 PM (3 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 6bac215
- Parents:
- 8aa4888
- git-author:
- Dmitry Portnoy <dportnoy@…> (06/08/21 20:38:16)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (06/08/21 23:19:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r8aa4888 r8dcbf62 160 160 { 161 161 0, 1, 2, 3, 4, 5 162 }, {162 }, objects_modelPipeline, { 163 163 mat4(1.0f) 164 164 }); 165 166 objects_modelPipeline.numObjects++;167 165 168 166 texturedSquare->model_base = … … 182 180 { 183 181 0, 1, 2, 3, 4, 5 184 }, {182 }, objects_modelPipeline, { 185 183 mat4(1.0f) 186 184 }); 187 188 objects_modelPipeline.numObjects++;189 185 190 186 texturedSquare->model_base = … … 445 441 132, 133, 134, 446 442 135, 136, 137, 447 }, {443 }, objects_shipPipeline, { 448 444 mat4(1.0f) 449 445 }); 450 451 objects_shipPipeline.numObjects++;452 446 453 447 ship.model_base = … … 781 775 { 782 776 0, 1, 2, 3, 4, 5 783 }, {777 }, objects_modelPipeline, { 784 778 mat4(1.0f) 785 779 }); 786 787 objects_modelPipeline.numObjects++;788 780 789 781 texturedSquare.model_base = … … 1063 1055 24, 25, 26, 27, 28, 29, 1064 1056 30, 31, 32, 33, 34, 35, 1065 }, {1057 }, objects_asteroidPipeline, { 1066 1058 mat4(1.0f), 1067 1059 10.0f, 1068 1060 false 1069 1061 }); 1070 1071 objects_asteroidPipeline.numObjects++;1072 1062 1073 1063 // This accounts for the scaling in model_base. … … 1551 1541 void VulkanGame::createImageResources() { 1552 1542 VulkanUtils::createDepthImage(device, physicalDevice, resourceCommandPool, findDepthFormat(), swapChainExtent, 1553 depthImage, graphicsQueue);1543 depthImage, graphicsQueue); 1554 1544 1555 1545 createTextureSampler(); … … 1979 1969 4, 5, 1, 4, 1, 0, 1980 1970 6, 7, 5, 6, 5, 4 1981 }, {1971 }, objects_laserPipeline, { 1982 1972 mat4(1.0f), 1983 1973 color, 1984 1974 false 1985 1975 }); 1986 1987 objects_laserPipeline.numObjects++;1988 1976 1989 1977 float xAxisRotation = asin(ray.y / length); … … 2187 2175 iota(indices.begin(), indices.end(), 0); 2188 2176 2189 SceneObject<ExplosionVertex, SSBO_Explosion>& explosion = addObject( 2190 explosionObjects, explosionPipeline, addObjectIndex(explosionObjects.size(), vertices), indices, {2177 SceneObject<ExplosionVertex, SSBO_Explosion>& explosion = addObject(explosionObjects, explosionPipeline, 2178 addObjectIndex(explosionObjects.size(), vertices), indices, objects_explosionPipeline, { 2191 2179 mat4(1.0f), 2192 2180 cur_time, … … 2195 2183 }); 2196 2184 2197 objects_explosionPipeline.numObjects++;2198 2199 2185 explosion.model_base = model_mat; 2200 2186 explosion.model_transform = mat4(1.0f); … … 2216 2202 // and resizing the window is a common reason to recreate the swapchain 2217 2203 VulkanUtils::createDepthImage(device, physicalDevice, resourceCommandPool, findDepthFormat(), swapChainExtent, 2218 depthImage, graphicsQueue);2204 depthImage, graphicsQueue); 2219 2205 2220 2206 createRenderPass();
Note:
See TracChangeset
for help on using the changeset viewer.