diff --git a/engine/gfx/vulkan/src/gfx_vulkan.cpp b/engine/gfx/vulkan/src/gfx_vulkan.cpp index e97c9ef..56fb670 100755 --- a/engine/gfx/vulkan/src/gfx_vulkan.cpp +++ b/engine/gfx/vulkan/src/gfx_vulkan.cpp @@ -86,7 +86,6 @@ VkBlendFactor toVkFactor(GFXBlendFactor factor) { return VK_BLEND_FACTOR_ONE; } - VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, @@ -835,8 +834,9 @@ void GFXVulkan::submit(GFXCommandBuffer* command_buffer, const int identifier) { renderPassInfo.framebuffer = framebuffer->handle; VkViewport viewport = {}; + viewport.y = static_cast(framebuffer->height); viewport.width = static_cast(framebuffer->width); - viewport.height = static_cast(framebuffer->height); + viewport.height = -static_cast(framebuffer->height); viewport.maxDepth = 1.0f; vkCmdSetViewport(commandBuffers[imageIndex], 0, 1, &viewport); @@ -851,8 +851,9 @@ void GFXVulkan::submit(GFXCommandBuffer* command_buffer, const int identifier) { renderPassInfo.framebuffer = swapchainFramebuffers[imageIndex]; VkViewport viewport = {}; + viewport.y = static_cast(surfaceHeight); viewport.width = static_cast(surfaceWidth); - viewport.height = static_cast(surfaceHeight); + viewport.height = -static_cast(surfaceHeight); viewport.maxDepth = 1.0f; vkCmdSetViewport(commandBuffers[imageIndex], 0, 1, &viewport);