[Feat] (MG_Backend/DirectVulkan): present, dynamic states, queue submit, and...triangle!

This commit is contained in:
2026-02-14 17:47:14 +08:00
parent b25562711a
commit 7bd4d74b2c
2 changed files with 51 additions and 13 deletions
@@ -37,11 +37,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
void Initialize();
void Shutdown();
void BeginCommandBuffer();
void BeginRenderPass();
void Render();
void EndRenderPass();
void EndCommandBuffer();
void Present();
private:
@@ -138,6 +134,10 @@ namespace MobileGL::MG_Backend::DirectVulkan {
static Bool GetMoreCapablePhysicalDevice(VkPhysicalDevice newVkDevice, VkSurfaceKHR surface, const PhysicalDevice& compareWithDevice, PhysicalDevice& outBetterDevice);
static VkSurfaceFormatKHR ChooseSwapchainSurfaceFormat(const Vector<VkSurfaceFormatKHR>& availableFormats);
static VkPresentModeKHR ChooseSwapchainPresentMode(const Vector<VkPresentModeKHR>& availablePresentModes);
static constexpr VkDynamicState s_dynamicStates[] = {
VK_DYNAMIC_STATE_VIEWPORT,
VK_DYNAMIC_STATE_SCISSOR
};
static constexpr VkPresentModeKHR s_desiredPresentModes[] {
VK_PRESENT_MODE_MAILBOX_KHR,
VK_PRESENT_MODE_IMMEDIATE_KHR,