mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 01:01:05 +00:00
- workaround for clearing the start screen in Vulkan.
There seems to be a bug in the backend, but I have no idea what's wrong. Clearing the start screen with a ClearRect call renders the 2D drawer in an unstable state. So for now, clear the screen by rendering a texture, but with light color black, which produces the same effect without later breaking stuff.
This commit is contained in:
parent
c8156fa581
commit
298407aaf3
1 changed files with 2 additions and 2 deletions
|
@ -669,8 +669,7 @@ void FStartScreen::Render(bool force)
|
|||
twod->Begin(screen->GetWidth(), screen->GetHeight());
|
||||
|
||||
// Weird shit moment: Vulkan does not render the screen clear if there isn't something textured in the buffer before it.
|
||||
DrawTexture(twod, StartupTexture, 0, 0, TAG_END);
|
||||
ClearRect(twod, 0, 0, twod->GetWidth(), twod->GetHeight(), GPalette.BlackIndex, 0);
|
||||
DrawTexture(twod, HeaderTexture, 0, 0, DTA_VirtualWidthF, HeaderTexture->GetDisplayWidth(), DTA_VirtualHeightF, HeaderTexture->GetDisplayHeight(), DTA_KeepRatio, true, DTA_Color, PalEntry(255,0,0,0), TAG_END);
|
||||
|
||||
if (HeaderTexture)
|
||||
{
|
||||
|
@ -686,6 +685,7 @@ void FStartScreen::Render(bool force)
|
|||
displayheight = StartupTexture->GetDisplayHeight();
|
||||
DrawTexture(twod, StartupTexture, 0, 0, DTA_VirtualWidthF, displaywidth, DTA_VirtualHeightF, displayheight, TAG_END);
|
||||
}
|
||||
|
||||
twod->End();
|
||||
screen->Update();
|
||||
twod->OnFrameDone();
|
||||
|
|
Loading…
Reference in a new issue