Finality Engine
Loading...
Searching...
No Matches
Pipeline.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <memory>
9#include "Renderer/Shader.h"
10
11#include <Core/Core.h>
12
13namespace FINALITY
14{
16 enum class CullMode
17 {
21 };
22
25 {
26 std::shared_ptr<Shader> VertexShader;
27 std::shared_ptr<Shader> FragmentShader;
28 bool EnableBlending = false;
29 bool DepthTest = true;
30 bool DepthWrite = true;
31
33 };
34
37 {
38 public:
39 virtual ~Pipeline() = default;
40 Pipeline(const Pipeline&) = delete;
41 Pipeline& operator=(const Pipeline&) = delete;
42 Pipeline() = default;
43
44 static std::shared_ptr<Pipeline> Create(const PipelineConfig& config);
45 bool IsTransparent() const { return m_Transparent; }
46 bool WritesDepth() const { return m_DepthWrite; }
47 bool TestsDepth() const { return m_DepthTest; }
48 CullMode GetCullMode() const { return m_Culling; }
49 protected:
50 bool m_Transparent = false;
51 bool m_DepthWrite = true;
52 bool m_DepthTest = true;
54 };
55}
#define FAPI
Definition Core.h:22
bool IsTransparent() const
Definition Pipeline.h:45
Pipeline(const Pipeline &)=delete
static std::shared_ptr< Pipeline > Create(const PipelineConfig &config)
bool TestsDepth() const
Definition Pipeline.h:47
CullMode m_Culling
Definition Pipeline.h:53
virtual ~Pipeline()=default
Pipeline & operator=(const Pipeline &)=delete
CullMode GetCullMode() const
Definition Pipeline.h:48
bool WritesDepth() const
Definition Pipeline.h:46
std::shared_ptr< Shader > VertexShader
Definition Pipeline.h:26
std::shared_ptr< Shader > FragmentShader
Definition Pipeline.h:27