GraphicsPipelineConfig.hpp 2.01 KB
Newer Older
1
#pragma once
Mara Vogt's avatar
Mara Vogt committed
2
3
/**
 * @authors Mara Vogt, Mark Mints
Mark Oliver Mints's avatar
Mark Oliver Mints committed
4
5
 * @file src/vkcv/PipelineConfig.hpp
 * @brief Graphics Pipeline Config Struct to hand over required information to Pipeline Creation
Mara Vogt's avatar
Mara Vogt committed
6
7
8
9
 */

#include <vector>
#include <cstdint>
10
#include "Handles.hpp"
11
#include "ShaderProgram.hpp"
12
#include "VertexLayout.hpp"
Alexander Gauggel's avatar
Alexander Gauggel committed
13
#include "ImageConfig.hpp"
Mara Vogt's avatar
Mara Vogt committed
14
15
16

namespace vkcv {

17
    enum class PrimitiveTopology{PointList, LineList, TriangleList };
18
	enum class CullMode{ None, Front, Back };
19
    enum class DepthTest { None, Less, LessEqual, Greater, GreatherEqual, Equal };
20

21
22
23
24
    // add more as needed
    // alternatively we could expose the blend factors directly
    enum class BlendMode{ None, Additive };

25
    struct GraphicsPipelineConfig {
26
27
28
29
30
31
32
33
34
35
        ShaderProgram                         	m_ShaderProgram;
        uint32_t                              	m_Width;
		uint32_t                              	m_Height;
        PassHandle                            	m_PassHandle;
        VertexLayout                          	m_VertexLayout;
        std::vector<vk::DescriptorSetLayout>  	m_DescriptorLayouts;
        bool                                  	m_UseDynamicViewport;
        bool                                  	m_UseConservativeRasterization 	= false;
        PrimitiveTopology                     	m_PrimitiveTopology 			= PrimitiveTopology::TriangleList;
		BlendMode                             	m_blendMode 					= BlendMode::None;
36
37
38
39
        bool                                    m_EnableDepthClamping           = false;
        Multisampling                           m_multisampling                 = Multisampling::None;
        CullMode                                m_culling                       = CullMode::None;
        DepthTest                               m_depthTest                     = DepthTest::LessEqual;
40
41
        bool                                    m_depthWrite                    = true;
        bool                                    m_alphaToCoverage               = false;
42
		uint32_t								m_tessellationControlPoints		= 0;
Mara Vogt's avatar
Mara Vogt committed
43
44
    };

45
}