Final Vulkan Init

This commit is contained in:
Pasha Bibko
2025-11-15 23:48:57 +00:00
parent c3aad0ebd1
commit 8ca07fc723
3 changed files with 236 additions and 6 deletions

View File

@@ -35,6 +35,9 @@ namespace PB::Renderer
static bool CreateSwapChain(GLFWwindow* window);
static bool CreateImageViews();
static bool CreateRenderPass();
static bool CreateFramebuffer();
static bool CreateGraphicsPipeline();
static bool CreateCommandBuffers();
private:
static bool IsDeviceSuitable(VkPhysicalDevice device, VkSurfaceKHR surface);
@@ -46,6 +49,8 @@ namespace PB::Renderer
static VkPresentModeKHR ChoosePresentMode(const std::vector<VkPresentModeKHR>& availablePresentModes);
static VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, GLFWwindow* window);
static VkShaderModule CreateShaderModule(const std::string& filename);
static std::optional<VkInstance> s_Instance;
static std::optional<VkSurfaceKHR> s_Surface;
@@ -64,5 +69,12 @@ namespace PB::Renderer
static VkExtent2D s_SwapChainExtent;
static VkRenderPass s_RenderPass;
static std::vector<VkFramebuffer> s_Framebuffers;
static VkPipelineLayout s_PipelineLayout;
static VkPipeline s_RenderPipeline;
static VkCommandPool s_CommandPool;
static std::vector<VkCommandBuffer> s_CommandBuffers;
};
}