Pulled the gui out into VkGUI to separate it out.
This commit is contained in:
parent
4f7ab6db68
commit
35198bce6b
6 changed files with 198 additions and 166 deletions
22
vk_engine.h
22
vk_engine.h
|
|
@ -5,22 +5,7 @@
|
|||
|
||||
#include <vk_types.h>
|
||||
#include <vk_descriptors.h>
|
||||
|
||||
struct ComputePushConstants {
|
||||
glm::vec4 data1;
|
||||
glm::vec4 data2;
|
||||
glm::vec4 data3;
|
||||
glm::vec4 data4;
|
||||
};
|
||||
|
||||
struct ComputeEffect {
|
||||
const char *name;
|
||||
VkPipeline pipeline;
|
||||
VkPipelineLayout layout;
|
||||
|
||||
ComputePushConstants data;
|
||||
};
|
||||
|
||||
#include "vk_gui.h"
|
||||
|
||||
struct DeletionQueue {
|
||||
std::deque<std::function<void()>> deletors;
|
||||
|
|
@ -48,7 +33,6 @@ struct FrameData {
|
|||
DeletionQueue _deletionQueue;
|
||||
};
|
||||
|
||||
constexpr unsigned int FRAME_OVERLAP=2;
|
||||
|
||||
class VulkanEngine {
|
||||
public:
|
||||
|
|
@ -104,6 +88,7 @@ public:
|
|||
// imgui shader stuff
|
||||
std::vector<ComputeEffect> backgroundEffects;
|
||||
int currentBackgroundEffect{0};
|
||||
VkGUI _gui;
|
||||
|
||||
static VulkanEngine& Get();
|
||||
|
||||
|
|
@ -129,11 +114,8 @@ private:
|
|||
void init_descriptors();
|
||||
void init_pipelines();
|
||||
void init_background_pipelines();
|
||||
void init_imgui();
|
||||
|
||||
void create_swapchain(uint32_t width, uint32_t height);
|
||||
void destroy_swapchain();
|
||||
void draw_background(VkCommandBuffer cmd);
|
||||
void draw_imgui(VkCommandBuffer cmd, VkImageView targetImageView);
|
||||
void render_imgui();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue