Got the triangle working! It only took 10 hours.

This commit is contained in:
Zed A. Shaw 2025-12-14 10:19:24 -05:00
parent 3d36517b4f
commit 10fc100e2b
11 changed files with 352 additions and 4 deletions

View file

@ -66,6 +66,7 @@ public:
std::vector<VkImageView> _swapchainImageViews;
VkExtent2D _swapchainExtent;
// VMA stuff
VmaAllocator _allocator;
@ -93,7 +94,9 @@ public:
// imgui shader stuff
std::vector<ComputeEffect> backgroundEffects;
int currentBackgroundEffect{0};
VkPipelineLayout _trianglePipelineLayout;
VkPipeline _trianglePipeline;
// ZED's REFACTOR
VkGUI _gui;
@ -126,8 +129,10 @@ private:
void init_background_pipelines();
void init_shaders();
void load_shader(const char *file_name, const char *entry_point, ComputeEffect data);
void init_triangle_pipelines();
void create_swapchain(uint32_t width, uint32_t height);
void destroy_swapchain();
void draw_background(VkCommandBuffer cmd);
void draw_geometry(VkCommandBuffer cmd);
};