vengine  0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
RenderSystem.hpp
Go to the documentation of this file.
1///
2/// @file RenderSystem.hpp
3/// @brief This file contains the RenderSystem class
4/// @namespace ven
5///
6
7#pragma once
8
9#include <memory>
10
11#include <vulkan/vulkan.h>
12
13#include "VEngine/Device.hpp"
14#include "VEngine/Shaders.hpp"
15#include "VEngine/FrameInfo.hpp"
16
17namespace ven {
18
20 glm::mat4 modelMatrix{1.F};
21 glm::mat4 normalMatrix{1.F};
22 };
23
24 ///
25 /// @class RenderSystem
26 /// @brief Class for render system
27 /// @namespace ven
29
30 public:
31
32 explicit RenderSystem(Device& device, VkRenderPass renderPass, VkDescriptorSetLayout globalSetLayout);
33 ~RenderSystem() { vkDestroyPipelineLayout(m_device.device(), m_pipelineLayout, nullptr); }
34
35 RenderSystem(const RenderSystem&) = delete;
37
38 void renderObjects(const FrameInfo &frameInfo) const;
39
40 private:
41
42 void createPipelineLayout(VkDescriptorSetLayout globalSetLayout);
43 void createPipeline(VkRenderPass renderPass);
44
46
47 std::unique_ptr<Shaders> m_shaders;
48 VkPipelineLayout m_pipelineLayout{nullptr};
49
50 }; // class RenderSystem
51
52} // namespace ven
This file contains the Device class.
This file contains the FrameInfo class.
This file contains the Shader class.
VkDevice device() const
Definition Device.hpp:48
Class for render system.
VkPipelineLayout m_pipelineLayout
std::unique_ptr< Shaders > m_shaders
RenderSystem(const RenderSystem &)=delete
void createPipelineLayout(VkDescriptorSetLayout globalSetLayout)
void renderObjects(const FrameInfo &frameInfo) const
RenderSystem(Device &device, VkRenderPass renderPass, VkDescriptorSetLayout globalSetLayout)
void createPipeline(VkRenderPass renderPass)
RenderSystem & operator=(const RenderSystem &)=delete