Changeset 7d2b0b9 in opengl-game
- Timestamp:
- Oct 3, 2019, 3:44:55 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 3de31cf
- Parents:
- 4d84c72
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
VulkanGame.vcxproj
r4d84c72 r7d2b0b9 135 135 <ClCompile Include="FileStackWalker.cpp" /> 136 136 <ClCompile Include="game-gui-sdl.cpp" /> 137 <ClCompile Include="graphics-pipeline_vulkan.cpp" /> 137 138 <ClCompile Include="logger.cpp" /> 138 139 <ClCompile Include="main-vulkan.cpp" /> … … 148 149 <ClInclude Include="game-gui-sdl.hpp" /> 149 150 <ClInclude Include="game-gui.hpp" /> 151 <ClInclude Include="graphics-pipeline.hpp" /> 152 <ClInclude Include="graphics-pipeline_vulkan.hpp" /> 150 153 <ClInclude Include="logger.hpp" /> 151 154 <ClInclude Include="StackWalker.h" /> -
vulkan-game.cpp
r4d84c72 r7d2b0b9 105 105 createRenderPass(); 106 106 createCommandPool(); 107 108 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device)); 109 graphicsPipelines.back().createPipeline("shaders/scene-vert.spv", "shaders/scene-frag.spv"); 110 111 graphicsPipelines.push_back(GraphicsPipeline_Vulkan(device)); 112 graphicsPipelines.back().createPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv"); 113 114 cout << "Created " << graphicsPipelines.size() << " graphics pipelines" << endl; 107 115 } 108 116 -
vulkan-game.hpp
r4d84c72 r7d2b0b9 3 3 4 4 #include "game-gui-sdl.hpp" 5 #include "graphics-pipeline_vulkan.hpp" 5 6 6 7 #ifdef NDEBUG … … 19 20 private: 20 21 GameGui* gui; 22 23 vector<GraphicsPipeline_Vulkan> graphicsPipelines; 21 24 22 25 SDL_version sdlVersion; -
vulkan-ref.cpp
r4d84c72 r7d2b0b9 863 863 864 864 void createGraphicsPipeline(string vertShaderFile, string fragShaderFile, GraphicsPipelineInfo& info) { 865 auto vertShaderCode = readFile(vertShaderFile); 866 auto fragShaderCode = readFile(fragShaderFile); 865 /*** START OF REFACTORED CODE ***/ 866 vector<char> vertShaderCode = readFile(vertShaderFile); 867 vector<char> fragShaderCode = readFile(fragShaderFile); 867 868 868 869 VkShaderModule vertShaderModule = createShaderModule(vertShaderCode); … … 885 886 VkPipelineVertexInputStateCreateInfo vertexInputInfo = {}; 886 887 vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; 888 /*** END OF REFACTORED CODE ***/ 887 889 888 890 vertexInputInfo.vertexBindingDescriptionCount = 1; … … 995 997 } 996 998 999 /*** START OF REFACTORED CODE ***/ 997 1000 vkDestroyShaderModule(device, vertShaderModule, nullptr); 998 1001 vkDestroyShaderModule(device, fragShaderModule, nullptr); 1002 /*** END OF REFACTORED CODE ***/ 999 1003 } 1000 1004
Note:
See TracChangeset
for help on using the changeset viewer.