Changeset 52a02e6 in opengl-game for vulkan-game.cpp
- Timestamp:
- Apr 26, 2020, 6:08:05 PM (4 years ago)
- Branches:
- feature/imgui-sdl, master
- Children:
- 4a9416a
- Parents:
- 73a10ca
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (04/26/20 17:55:49)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (04/26/20 18:08:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r73a10ca r52a02e6 519 519 }, false); 520 520 521 ship.model_base = 522 translate(mat4(1.0f), vec3(0.0f, -1.2f, 1.65f)) * 523 scale(mat4(1.0f), vec3(0.1f, 0.1f, 0.1f)); 524 ship.modified = true; 525 521 526 shipPipeline.createDescriptorSetLayout(); 522 527 shipPipeline.createPipeline("shaders/ship-vert.spv", "shaders/ship-frag.spv"); … … 564 569 565 570 createSyncObjects(); 566 567 ship.model_base =568 translate(mat4(1.0f), vec3(0.0f, -1.2f, 1.65f)) *569 scale(mat4(1.0f), vec3(0.1f, 0.1f, 0.1f));570 ship.modified = true;571 571 } 572 572 573 573 void VulkanGame::initGraphicsPipelines() { 574 overlayPipeline = GraphicsPipeline_Vulkan<OverlayVertex, void*>(physicalDevice, device, renderPass, 574 overlayPipeline = GraphicsPipeline_Vulkan<OverlayVertex, void*>( 575 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, physicalDevice, device, renderPass, 575 576 { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 4, 6, 0); 576 577 577 modelPipeline = GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject>(physicalDevice, device, renderPass, 578 modelPipeline = GraphicsPipeline_Vulkan<ModelVertex, SSBO_ModelObject>( 579 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, physicalDevice, device, renderPass, 578 580 { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 16, 24, 10); 579 581 580 shipPipeline = GraphicsPipeline_Vulkan<ShipVertex, SSBO_ModelObject>(physicalDevice, device, renderPass, 582 shipPipeline = GraphicsPipeline_Vulkan<ShipVertex, SSBO_ModelObject>( 583 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, physicalDevice, device, renderPass, 581 584 { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 138, 138, 10); 582 585 583 asteroidPipeline = GraphicsPipeline_Vulkan<AsteroidVertex, SSBO_Asteroid>(physicalDevice, device, renderPass, 586 asteroidPipeline = GraphicsPipeline_Vulkan<AsteroidVertex, SSBO_Asteroid>( 587 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, physicalDevice, device, renderPass, 584 588 { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 24, 36, 10); 585 589 586 laserPipeline = GraphicsPipeline_Vulkan<LaserVertex, SSBO_Laser>(physicalDevice, device, renderPass, 590 laserPipeline = GraphicsPipeline_Vulkan<LaserVertex, SSBO_Laser>( 591 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, physicalDevice, device, renderPass, 587 592 { 0, 0, (int)swapChainExtent.width, (int)swapChainExtent.height }, swapChainImages, 8, 18, 2); 588 593 } … … 1571 1576 } 1572 1577 1573 void VulkanGame::addLaser( 1578 void VulkanGame::addLaser(vec3 start, vec3 end, vec3 color, float width) { 1574 1579 vec3 ray = end - start; 1575 1580 float length = glm::length(ray);
Note:
See TracChangeset
for help on using the changeset viewer.