render_system.h 995 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "coral_camera.h"
  3. #include "coral_device.h"
  4. #include "coral_pipeline.h"
  5. #include "coral_gameobject.h"
  6. #include "coral_frame_info.h"
  7. #include "coral_descriptors.h"
  8. #include "coral_texture.h"
  9. #define MAX_MATERIAL_SETS 4096
  10. // STD
  11. #include <memory>
  12. #include <vector>
  13. namespace coral_3d
  14. {
  15. class render_system final
  16. {
  17. public:
  18. render_system(coral_device& device, std::vector<VkDescriptorSetLayout>& desc_set_layouts);
  19. ~render_system();
  20. render_system(const render_system&) = delete;
  21. render_system& operator=(const render_system&) = delete;
  22. void render_gameobjects(FrameInfo& frame_info);
  23. VkPipelineLayout pipeline_layout() const { return pipeline_layout_; }
  24. VkPipeline pipeline() const { return pipeline_->pipeline(); }
  25. private:
  26. void create_pipeline_layout(coral_device& device, std::vector<VkDescriptorSetLayout>& desc_set_layouts);
  27. coral_device& device_;
  28. std::unique_ptr<coral_pipeline> pipeline_;
  29. VkPipelineLayout pipeline_layout_;
  30. };
  31. }