skybox_system.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef SKYBOX_SYSTEM_H
  2. #define SKYBOX_SYSTEM_H
  3. // CORAL
  4. #include "coral_camera.h"
  5. #include "coral_device.h"
  6. #include "coral_pipeline.h"
  7. #include "coral_gameobject.h"
  8. #include "coral_frame_info.h"
  9. #include "coral_descriptors.h"
  10. // STD
  11. #include <memory>
  12. #include <vector>
  13. namespace coral_3d
  14. {
  15. class skybox_system final
  16. {
  17. public:
  18. skybox_system(coral_device& device, VkRenderPass render_pass, std::vector<VkDescriptorSetLayout>& desc_set_layouts);
  19. ~skybox_system();
  20. skybox_system(const skybox_system&) = delete;
  21. skybox_system& operator=(const skybox_system&) = delete;
  22. void render(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. void create_pipeline(VkRenderPass render_pass);
  28. coral_device& device_;
  29. std::unique_ptr<coral_pipeline> pipeline_;
  30. VkPipelineLayout pipeline_layout_;
  31. };
  32. } // coral_3d
  33. #endif // SKYBOX_SYSTEM_H