First commit from Arch
This commit is contained in:
29
src/VulkanGraphicsPipeline.h
Normal file
29
src/VulkanGraphicsPipeline.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "FileReader.h"
|
||||
#include "vulkan_core.h"
|
||||
|
||||
class VulkanGraphicsPipeline
|
||||
{
|
||||
public:
|
||||
void CreateGraphicsPipeline()
|
||||
{
|
||||
auto VertShaderCode = ReadFile("Shaders/vert.spv");
|
||||
auto FragShaderCode = ReadFile("Shaders/frag.spv");
|
||||
|
||||
Log::Info("Vert buffer size: " + std::to_string(VertShaderCode.size()));
|
||||
Log::Info("Frag buffer size: " + std::to_string(FragShaderCode.size()));
|
||||
}
|
||||
|
||||
VkShaderModule CreateShaderModule(const std::vector<char>& Code)
|
||||
{
|
||||
VkShaderModuleCreateInfo CreateInfo{};
|
||||
CreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
|
||||
CreateInfo.codeSize = Code.size();
|
||||
CreateInfo.pCode = reinterpret_cast<const uint32_t*>(Code.data());
|
||||
|
||||
VkShaderModule ShaderModule;
|
||||
// if (vkCreateShaderModule(Device))
|
||||
return ShaderModule;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user