diff options
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); }; } |