mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Port UI icon textures from OpenGL to Vulkan, fix loading screen clear values
Replace all glGenTextures/glTexImage2D calls in UI code with Vulkan texture uploads via new VkContext::uploadImGuiTexture() helper. This fixes segfaults from calling OpenGL functions without a GL context (null GLEW function pointers). - Add uploadImGuiTexture() to VkContext with staging buffer upload pattern - Convert game_screen, inventory_screen, spellbook_screen, talent_screen from GLuint/GL calls to VkDescriptorSet/Vulkan uploads - Fix loading_screen clearValueCount (was 1, needs 2 or 3 for MSAA)
This commit is contained in:
parent
b1a9d231c7
commit
325254dfcb
11 changed files with 314 additions and 136 deletions
|
|
@ -338,9 +338,14 @@ void LoadingScreen::render() {
|
|||
rpInfo.renderArea.offset = {0, 0};
|
||||
rpInfo.renderArea.extent = vkCtx->getSwapchainExtent();
|
||||
|
||||
VkClearValue clearColor = {{{0.0f, 0.0f, 0.0f, 1.0f}}};
|
||||
rpInfo.clearValueCount = 1;
|
||||
rpInfo.pClearValues = &clearColor;
|
||||
// Render pass has 2 attachments (color + depth) or 3 with MSAA
|
||||
VkClearValue clearValues[3]{};
|
||||
clearValues[0].color = {{0.0f, 0.0f, 0.0f, 1.0f}};
|
||||
clearValues[1].depthStencil = {1.0f, 0};
|
||||
clearValues[2].color = {{0.0f, 0.0f, 0.0f, 1.0f}};
|
||||
bool msaaOn = vkCtx->getMsaaSamples() > VK_SAMPLE_COUNT_1_BIT;
|
||||
rpInfo.clearValueCount = msaaOn ? 3 : 2;
|
||||
rpInfo.pClearValues = clearValues;
|
||||
|
||||
vkCmdBeginRenderPass(cmd, &rpInfo, VK_SUBPASS_CONTENTS_INLINE);
|
||||
ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), cmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue