From 3d6ca447a7104c499e92fc954affdaf4bf011388 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Fri, 16 Sep 2022 12:03:04 -0300 Subject: feat Create View --- src/vk/graphics_pipeline_3d.hpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/vk/graphics_pipeline_3d.hpp') 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 ub_view_projection; - std::vector ub_directional_light; + std::vector ub_world_vert; + std::vector ub_world_frag; VkDescriptorPool descriptor_pool; - std::vector world_view_descriptor_sets; + std::vector descriptor_sets_world; std::vector swapchain_framebuffers; VkPipeline graphic_pipeline; - std::shared_ptr camera_position; - std::shared_ptr camera_rotation; - std::vector, std::vector>> - 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, const VkCommandBuffer draw_command_buffer, + const size_t current_frame, const uint32_t image_index); }; } -- cgit v1.2.3