summaryrefslogtreecommitdiff
path: root/src/vk/graphics_pipeline_2d.hpp
diff options
context:
space:
mode:
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);
};
}