summaryrefslogtreecommitdiff
path: root/src/vk/graphics_pipeline_2d.hpp
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2022-09-16 12:03:04 -0300
committerFrederico Linhares <fred@linhares.blue>2022-09-16 12:03:04 -0300
commit3d6ca447a7104c499e92fc954affdaf4bf011388 (patch)
treed759fbd39d3d66a2457ea92fc4eeb2c31b2cbe4f /src/vk/graphics_pipeline_2d.hpp
parent0d0868611389b8dded0c1dfef7a530a4b6e1f148 (diff)
feat Create View
Diffstat (limited to 'src/vk/graphics_pipeline_2d.hpp')
-rw-r--r--src/vk/graphics_pipeline_2d.hpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/vk/graphics_pipeline_2d.hpp b/src/vk/graphics_pipeline_2d.hpp
index 193c06d..dd4bb29 100644
--- a/src/vk/graphics_pipeline_2d.hpp
+++ b/src/vk/graphics_pipeline_2d.hpp
@@ -17,36 +17,30 @@
#ifndef CANDY_GEAR_VK_GRAPHICS_PIPELINE_2D_H
#define CANDY_GEAR_VK_GRAPHICS_PIPELINE_2D_H 1
+#include <memory>
+#include <unordered_map>
#include <vector>
#include "core.hpp"
#include "sprite.hpp"
+#include "view.hpp"
namespace VK
{
struct GraphicsPipeline2D
{
- // FIXME: if this vector get resized, it will cause a segmentation fault!
- std::vector<UniformBuffer> ub_projection;
-
- VkDescriptorPool descriptor_pool;
- std::vector<VkDescriptorSet> projection_descriptor_sets;
-
VkRenderPass render_pass;
std::vector<VkFramebuffer> swapchain_framebuffers;
VkPipeline graphic_pipeline;
- std::vector<
- std::unordered_map<std::shared_ptr<Sprite>, std::vector<glm::vec4>>>
- sprites_to_draw;
-
GraphicsPipeline2D();
~GraphicsPipeline2D();
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 size_t next_frame,
+ const uint32_t image_index);
};
}