mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
Fixed black target screen during wipe (legacy renderer only)
Credits: NiTROACTiVE and Erick194 https://www.doomworld.com/vb/source-ports/93179-two-issues-im-having-with-gzdoom-v2-3-2/
This commit is contained in:
parent
8400961a00
commit
f9e543bed3
1 changed files with 11 additions and 2 deletions
|
@ -143,17 +143,26 @@ bool OpenGLFrameBuffer::WipeStartScreen(int type)
|
|||
glFinish();
|
||||
wipestartscreen->Bind(0, false, false);
|
||||
|
||||
const auto copyPixels = [&viewport]()
|
||||
{
|
||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, viewport.left, viewport.top, viewport.width, viewport.height);
|
||||
};
|
||||
|
||||
if (FGLRenderBuffers::IsEnabled())
|
||||
{
|
||||
GLRenderer->mBuffers->BindCurrentFB();
|
||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, viewport.left, viewport.top, viewport.width, viewport.height);
|
||||
copyPixels();
|
||||
}
|
||||
else if (gl.legacyMode)
|
||||
{
|
||||
copyPixels();
|
||||
}
|
||||
else
|
||||
{
|
||||
GLint readbuffer = 0;
|
||||
glGetIntegerv(GL_READ_BUFFER, &readbuffer);
|
||||
glReadBuffer(GL_FRONT);
|
||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, viewport.left, viewport.top, viewport.width, viewport.height);
|
||||
copyPixels();
|
||||
glReadBuffer(readbuffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue