diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-09-16 12:03:04 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-09-16 12:03:04 -0300 |
commit | 3d6ca447a7104c499e92fc954affdaf4bf011388 (patch) | |
tree | d759fbd39d3d66a2457ea92fc4eeb2c31b2cbe4f /src/vk/graphics_pipeline_3d.hpp | |
parent | 0d0868611389b8dded0c1dfef7a530a4b6e1f148 (diff) |
feat Create View
Diffstat (limited to 'src/vk/graphics_pipeline_3d.hpp')
-rw-r--r-- | src/vk/graphics_pipeline_3d.hpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/vk/graphics_pipeline_3d.hpp b/src/vk/graphics_pipeline_3d.hpp index 97ca63c..a7cf117 100644 --- a/src/vk/graphics_pipeline_3d.hpp +++ b/src/vk/graphics_pipeline_3d.hpp @@ -26,6 +26,7 @@ #include "model.hpp" #include "model_instance.hpp" #include "uniform_buffer.hpp" +#include "view.hpp" namespace VK { @@ -38,27 +39,21 @@ struct GraphicsPipeline3D VkImageView depth_image_view; // FIXME: if this vector get resized, it will cause a segmentation fault! - std::vector<UniformBuffer> ub_view_projection; - std::vector<UniformBuffer> ub_directional_light; + std::vector<UniformBuffer> ub_world_vert; + std::vector<UniformBuffer> ub_world_frag; VkDescriptorPool descriptor_pool; - std::vector<VkDescriptorSet> world_view_descriptor_sets; + std::vector<VkDescriptorSet> descriptor_sets_world; std::vector<VkFramebuffer> swapchain_framebuffers; VkPipeline graphic_pipeline; - std::shared_ptr<glm::vec3> camera_position; - std::shared_ptr<glm::vec3> camera_rotation; - std::vector<std::unordered_map< - std::shared_ptr<Model>, std::vector<ModelInstance>>> - models_to_draw; - GraphicsPipeline3D(); ~GraphicsPipeline3D(); void - draw(const VkCommandBuffer draw_command_buffer, const size_t current_frame, - const size_t next_frame, const uint32_t image_index); + draw(std::shared_ptr<View> view, const VkCommandBuffer draw_command_buffer, + const size_t current_frame, const uint32_t image_index); }; } |