Changeset 603b5bc in opengl-game for graphics-pipeline_vulkan.cpp


Ignore:
Timestamp:
Oct 22, 2019, 7:53:48 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
34bdf3a
Parents:
e83b155
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (10/22/19 19:10:44)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (10/22/19 19:53:48)
Message:

In vulkangame, add code to create the frame buffers and command buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graphics-pipeline_vulkan.cpp

    re83b155 r603b5bc  
    263263}
    264264
     265void GraphicsPipeline_Vulkan::createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) {
     266   vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
     267   vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1,
     268      &descriptorSets[currentImage], 0, nullptr);
     269
     270   // TODO: Implement once I add vertex and index buffers to the pipeline
     271   /*
     272   VkBuffer vertexBuffers[] = { info.vertexBuffer };
     273   VkDeviceSize offsets[] = { 0 };
     274   vkCmdBindVertexBuffers(commandBuffers[currentImage], 0, 1, vertexBuffers, offsets);
     275
     276   vkCmdBindIndexBuffer(commandBuffers[currentImage], info.indexBuffer, 0, VK_INDEX_TYPE_UINT16);
     277
     278   vkCmdDrawIndexed(commandBuffers[currentImage], static_cast<uint32_t>(info.numIndices), 1, 0, 0, 0);
     279   */
     280}
     281
    265282VkShaderModule GraphicsPipeline_Vulkan::createShaderModule(const vector<char>& code) {
    266283   VkShaderModuleCreateInfo createInfo = {};
Note: See TracChangeset for help on using the changeset viewer.