mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Move SetOutputViewport to OpenGLFrameBuffer::Update as it cannot be safely called from Begin2D
This commit is contained in:
parent
fd4422eb62
commit
f8cc56ea3a
2 changed files with 2 additions and 3 deletions
|
@ -286,9 +286,6 @@ void FGLRenderer::Begin2D()
|
||||||
{
|
{
|
||||||
if (FGLRenderBuffers::IsEnabled())
|
if (FGLRenderBuffers::IsEnabled())
|
||||||
{
|
{
|
||||||
if (!mDrawingScene2D) // For when there's no scene rendered (main menu and intermission)
|
|
||||||
SetOutputViewport(nullptr);
|
|
||||||
|
|
||||||
mBuffers->Setup(mScreenViewport.width, mScreenViewport.height, mSceneViewport.width, mSceneViewport.height);
|
mBuffers->Setup(mScreenViewport.width, mScreenViewport.height, mSceneViewport.width, mSceneViewport.height);
|
||||||
if (mDrawingScene2D)
|
if (mDrawingScene2D)
|
||||||
mBuffers->BindSceneFB();
|
mBuffers->BindSceneFB();
|
||||||
|
|
|
@ -187,6 +187,8 @@ void OpenGLFrameBuffer::Update()
|
||||||
DrawRateStuff();
|
DrawRateStuff();
|
||||||
GLRenderer->Flush();
|
GLRenderer->Flush();
|
||||||
|
|
||||||
|
GLRenderer->SetOutputViewport(nullptr);
|
||||||
|
|
||||||
if (gl_draw_sync || !swapped)
|
if (gl_draw_sync || !swapped)
|
||||||
{
|
{
|
||||||
Swap();
|
Swap();
|
||||||
|
|
Loading…
Reference in a new issue