diff options
Diffstat (limited to 'src/blu_cat/gra/renderer.hpp')
-rw-r--r-- | src/blu_cat/gra/renderer.hpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/blu_cat/gra/renderer.hpp b/src/blu_cat/gra/renderer.hpp index 82948cb..58b9972 100644 --- a/src/blu_cat/gra/renderer.hpp +++ b/src/blu_cat/gra/renderer.hpp @@ -22,14 +22,15 @@ #include <vector> #include "vulkan.hpp" +#include "queue_family.hpp" +#include "rectangle.hpp" #include "skeletal_mesh.hpp" #include "skeletal_model.hpp" #include "sprite_3d.hpp" +#include "sprite_to_draw.hpp" #include "static_mesh.hpp" #include "static_model.hpp" -#include "queue_family.hpp" -#include "view_2d.hpp" -#include "view_3d.hpp" +#include "view.hpp" namespace BluCat::GRA { @@ -52,16 +53,25 @@ struct Renderer VkDescriptorPool descriptor_pool; VkClearColorValue clear_screen_color; - std::vector<std::shared_ptr<View2D>> views_2d; - std::vector<std::shared_ptr<View3D>> views_3d; + + float projection_width, projection_height; + + // FIXME: if these vectors get resized, they can cause a segmentation fault! + std::vector<UniformBuffer> ub_2d; + std::vector<VkDescriptorSet> descriptor_sets_2d; + + std::vector<std::vector<Rectangle>> rectangles_to_draw; + std::vector<std::vector<SpriteToDraw>> sprites_to_draw; + + std::vector<std::shared_ptr<View>> views; + QueueFamily *queue_family; VkCommandPool command_pool; std::vector<VkCommandBuffer> draw_command_buffers; - Renderer(std::vector<std::shared_ptr<View2D>> views_2d, - std::vector<std::shared_ptr<View3D>> views_3d); - Renderer(std::initializer_list<std::shared_ptr<View2D>> views_2d, - std::initializer_list<std::shared_ptr<View3D>> views_3d); + Renderer(std::vector<std::shared_ptr<View>> views, F32 width, F32 height); + Renderer(std::initializer_list<std::shared_ptr<View>> views, + F32 width, F32 height); ~Renderer(); void |