Expose culling mode in shader config
This commit is contained in:
@@ -14,6 +14,14 @@
|
||||
|
||||
namespace openVulkanoCpp::Scene
|
||||
{
|
||||
enum class CullMode : uint32_t
|
||||
{
|
||||
NONE = 0,
|
||||
FRONT,
|
||||
BACK,
|
||||
FRONT_AND_BACK
|
||||
};
|
||||
|
||||
enum class Topology : uint32_t
|
||||
{
|
||||
POINT_LIST = 0,
|
||||
@@ -122,6 +130,7 @@ namespace openVulkanoCpp::Scene
|
||||
std::vector<ShaderProgram> shaderPrograms{};
|
||||
std::vector<VertexInputDescription> vertexInputDescriptions{};
|
||||
Topology topology = Topology::TRIANGLE_LIST;
|
||||
CullMode cullMode = CullMode::BACK;
|
||||
ICloseable* renderShader = nullptr;
|
||||
|
||||
Shader() = default;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace openVulkanoCpp::Vulkan
|
||||
attributeDescriptionsSize, attributeDescriptionsData };
|
||||
vk::PipelineInputAssemblyStateCreateInfo inputAssembly = { {}, static_cast<vk::PrimitiveTopology>(shader->topology), 0 };
|
||||
vk::PipelineRasterizationStateCreateInfo rasterizer = {};
|
||||
rasterizer.cullMode = vk::CullModeFlagBits::eBack;
|
||||
rasterizer.cullMode = static_cast<vk::CullModeFlagBits>(shader->cullMode);
|
||||
vk::PipelineMultisampleStateCreateInfo msaa = {};
|
||||
vk::PipelineDepthStencilStateCreateInfo depth = { {}, 1, 1, vk::CompareOp::eLess };
|
||||
depth.maxDepthBounds = 1;
|
||||
|
||||
Reference in New Issue
Block a user