From ab3811bac0fc6b8781dce29dc3b2dc38e1baf1ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 31 Jan 2020 22:07:51 +0100 Subject: [PATCH] - fixed: The 2D drawer must apply the render state before it finishes. Otherwise the global state settings will not be reset. --- source/exhumed/src/view.cpp | 17 ----------------- source/glbackend/hw_draw2d.cpp | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 5e14f9509..6b279d68c 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -257,23 +257,6 @@ void SetView1() { } -void FlushMessageLine() -{ - int tileX = tilesiz[nBackgroundPic].x; - int nTileOffset = 0; - - int xPos = 0; - - while (xPos < xdim) - { - overwritesprite(xPos, 0, nBackgroundPic + nTileOffset, -32, 0, kPalNormal); - - nTileOffset = nTileOffset == 0; - - xPos += tileX; - } -} - void RefreshBackground() { if (screensize <= 0) diff --git a/source/glbackend/hw_draw2d.cpp b/source/glbackend/hw_draw2d.cpp index e02568908..597e5d1e7 100644 --- a/source/glbackend/hw_draw2d.cpp +++ b/source/glbackend/hw_draw2d.cpp @@ -214,7 +214,6 @@ void GLInstance::Draw2D(F2DDrawer *drawer) */ } - //state.SetScissor(-1, -1, -1, -1); //state.SetRenderStyle(STYLE_Translucent); ClearBufferState(); @@ -230,6 +229,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer) EnableMultisampling(true); SetIdentityMatrix(Matrix_Projection); matrixArray.Resize(1); + renderState.Apply(polymostShader, lastState); // actually set the desired state before returning. }