vktutorial/simple_render_system.hpp

34 lines
786 B
C++
Raw Permalink Normal View History

2024-04-03 22:22:29 +08:00
#pragma once
#include "hk_device.hpp"
#include "hk_game_object.hpp"
#include "hk_pipeline.hpp"
// std
#include <memory>
#include <vector>
namespace hk
{
class SimpleRenderSystem
{
public:
SimpleRenderSystem(Device &device, VkRenderPass renderPass);
~SimpleRenderSystem();
SimpleRenderSystem(const SimpleRenderSystem &) = delete;
SimpleRenderSystem &operator=(const SimpleRenderSystem &) = delete;
void renderGameObjects(VkCommandBuffer commandBuffer, std::vector<GameObject> &gameObjects);
private:
void createPipelineLayout();
void createPipeline(VkRenderPass renderPass);
Device &m_device;
std::unique_ptr<Pipeline> m_pipeline;
VkPipelineLayout m_pipelineLayout;
};
}