Add file structure to code

- Rename project to CopiumEngine
This commit is contained in:
Thraix
2023-02-07 21:43:47 +01:00
parent ef4eb7dd2f
commit 827572eada
494 changed files with 205 additions and 195 deletions
@@ -0,0 +1,38 @@
#include "copium/pipeline/PipelineCreator.h"
#include "copium/util/Common.h"
namespace Copium
{
PipelineCreator::PipelineCreator(VkRenderPass renderPass, const std::string& vertexShader, const std::string& fragmentShader)
: vertexShader{vertexShader},
fragmentShader{fragmentShader},
renderPass{renderPass}
{}
void PipelineCreator::SetVertexDescriptor(const VertexDescriptor& descriptor)
{
vertexDescriptor = descriptor;
}
void PipelineCreator::AddDescriptorSetLayoutBinding(uint32_t set, uint32_t binding, VkDescriptorType type, uint32_t count, VkShaderStageFlags stageFlags)
{
CP_ASSERT(set <= descriptorSetLayouts.size(), "AddDescriptorSetLayoutBinding : Cannot add descriptor set with set number greater than the current set count");
descriptorSetLayouts[set].emplace_back(DescriptorSetBinding{binding, type, count, stageFlags});
}
void PipelineCreator::SetPrimitiveTopology(VkPrimitiveTopology primitiveTopology)
{
topology = primitiveTopology;
}
void PipelineCreator::SetCullMode(VkCullModeFlags flags)
{
cullMode = flags;
}
void PipelineCreator::SetCullFrontFace(VkFrontFace cullFrontFace)
{
frontFace = cullFrontFace;
}
}