Changeset 7d2b0b9 in opengl-game for vulkan-ref.cpp


Ignore:
Timestamp:
Oct 3, 2019, 3:44:55 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
3de31cf
Parents:
4d84c72
Message:

Add and begin implementing a GraphicsPipeline class to hold info for the Vulkan graphics pipeline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-ref.cpp

    r4d84c72 r7d2b0b9  
    863863
    864864      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);
    867868
    868869         VkShaderModule vertShaderModule = createShaderModule(vertShaderCode);
     
    885886         VkPipelineVertexInputStateCreateInfo vertexInputInfo = {};
    886887         vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
     888/*** END OF REFACTORED CODE ***/
    887889
    888890         vertexInputInfo.vertexBindingDescriptionCount = 1;
     
    995997         }
    996998
     999/*** START OF REFACTORED CODE ***/
    9971000         vkDestroyShaderModule(device, vertShaderModule, nullptr);
    9981001         vkDestroyShaderModule(device, fragShaderModule, nullptr);
     1002/*** END OF REFACTORED CODE ***/
    9991003      }
    10001004
Note: See TracChangeset for help on using the changeset viewer.