mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 08:31:14 +00:00
- Reverse the status bar offset when shearing the viewport in Vulkan - fixes the issue with a black bar at the top of the screen
This commit is contained in:
parent
f2a311dfca
commit
916f21942c
1 changed files with 4 additions and 4 deletions
|
@ -313,16 +313,16 @@ void VkRenderState::ApplyScissor()
|
|||
if (mScissorChanged)
|
||||
{
|
||||
VkRect2D scissor;
|
||||
auto buffers = GetVulkanFrameBuffer()->GetBuffers();
|
||||
if (mScissorWidth >= 0)
|
||||
{
|
||||
scissor.offset.x = mScissorX;
|
||||
scissor.offset.y = mScissorY;
|
||||
scissor.offset.y = buffers->GetHeight() - mScissorY - mViewportHeight;
|
||||
scissor.extent.width = mScissorWidth;
|
||||
scissor.extent.height = mScissorHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto buffers = GetVulkanFrameBuffer()->GetBuffers();
|
||||
scissor.offset.x = 0;
|
||||
scissor.offset.y = 0;
|
||||
scissor.extent.width = buffers->GetWidth();
|
||||
|
@ -338,16 +338,16 @@ void VkRenderState::ApplyViewport()
|
|||
if (mViewportChanged)
|
||||
{
|
||||
VkViewport viewport;
|
||||
auto buffers = GetVulkanFrameBuffer()->GetBuffers();
|
||||
if (mViewportWidth >= 0)
|
||||
{
|
||||
viewport.x = (float)mViewportX;
|
||||
viewport.y = (float)mViewportY;
|
||||
viewport.y = (float)buffers->GetHeight() - mViewportY - mViewportHeight;
|
||||
viewport.width = (float)mViewportWidth;
|
||||
viewport.height = (float)mViewportHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto buffers = GetVulkanFrameBuffer()->GetBuffers();
|
||||
viewport.x = 0.0f;
|
||||
viewport.y = 0.0f;
|
||||
viewport.width = (float)buffers->GetWidth();
|
||||
|
|
Loading…
Reference in a new issue