Changeset 771b33a in opengl-game for vulkan-game.cpp
- Timestamp:
- Oct 4, 2019, 8:39:46 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- b794178
- Parents:
- 0b1b52d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r0b1b52d r771b33a 8 8 #include "logger.hpp" 9 9 10 #include "utils.hpp" 10 11 #include "vulkan-utils.hpp" 11 12 … … 106 107 createCommandPool(); 107 108 108 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device)); 109 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device, viewport, sizeof(Vertex))); 110 111 graphicsPipelines.back().addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&Vertex::pos)); 112 graphicsPipelines.back().addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&Vertex::color)); 113 graphicsPipelines.back().addAttribute(VK_FORMAT_R32G32_SFLOAT, offset_of(&Vertex::texCoord)); 114 109 115 graphicsPipelines.back().createPipeline("shaders/scene-vert.spv", "shaders/scene-frag.spv"); 110 116 111 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device)); 117 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device, viewport, sizeof(OverlayVertex))); 118 119 graphicsPipelines.back().addAttribute(VK_FORMAT_R32G32B32_SFLOAT, offset_of(&OverlayVertex::pos)); 120 graphicsPipelines.back().addAttribute(VK_FORMAT_R32G32_SFLOAT, offset_of(&OverlayVertex::texCoord)); 121 112 122 graphicsPipelines.back().createPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv"); 113 123 … … 427 437 428 438 swapChainImageFormat = surfaceFormat.format; 429 swapChainExtent = extent;439 viewport = { 0, 0, (int)extent.width, (int)extent.height }; 430 440 } 431 441
Note:
See TracChangeset
for help on using the changeset viewer.