mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 22:01:41 +00:00
Fix viewpoint buffer not getting cleared when in the menus
This commit is contained in:
parent
aae85a1b91
commit
742ae8c907
4 changed files with 10 additions and 2 deletions
|
@ -484,6 +484,7 @@ void OpenGLFrameBuffer::SetSaveBuffers(bool yes)
|
|||
void OpenGLFrameBuffer::BeginFrame()
|
||||
{
|
||||
SetViewportRects(nullptr);
|
||||
mViewpoints->Clear();
|
||||
if (GLRenderer != nullptr)
|
||||
GLRenderer->BeginFrame();
|
||||
}
|
||||
|
|
|
@ -369,6 +369,7 @@ void OpenGLFrameBuffer::WaitForCommands(bool finish)
|
|||
void OpenGLFrameBuffer::BeginFrame()
|
||||
{
|
||||
SetViewportRects(nullptr);
|
||||
mViewpoints->Clear();
|
||||
if (GLRenderer != nullptr)
|
||||
GLRenderer->BeginFrame();
|
||||
}
|
||||
|
|
|
@ -117,11 +117,16 @@ int HWViewpointBuffer::SetViewpoint(FRenderState &di, HWViewpointUniforms *vp)
|
|||
|
||||
void HWViewpointBuffer::Clear()
|
||||
{
|
||||
bool needNewPipeline = mUploadIndex > 0; // Clear might be called multiple times before any actual rendering
|
||||
|
||||
mUploadIndex = 0;
|
||||
mClipPlaneInfo.Clear();
|
||||
|
||||
if (needNewPipeline)
|
||||
{
|
||||
mPipelinePos++;
|
||||
mPipelinePos %= mPipelineNbr;
|
||||
}
|
||||
|
||||
mBuffer = mBufferPipeline[mPipelinePos];
|
||||
}
|
||||
|
|
|
@ -419,6 +419,7 @@ TArray<uint8_t> VulkanFrameBuffer::GetScreenshotBuffer(int &pitch, ESSType &colo
|
|||
void VulkanFrameBuffer::BeginFrame()
|
||||
{
|
||||
SetViewportRects(nullptr);
|
||||
mViewpoints->Clear();
|
||||
mCommands->BeginFrame();
|
||||
mTextureManager->BeginFrame();
|
||||
mScreenBuffers->BeginFrame(screen->mScreenViewport.width, screen->mScreenViewport.height, screen->mSceneViewport.width, screen->mSceneViewport.height);
|
||||
|
|
Loading…
Reference in a new issue