Graphics: Reset scissor box on screen resize

Fixes Ancurio/mkxp#248.
This commit is contained in:
Amaryllis Kulla 2022-01-30 12:36:37 +01:00
parent 3c6bc765c6
commit 1c2dc115b8
2 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,7 @@ GLState::GLState(const Config &conf)
blendMode.init(BlendNormal); blendMode.init(BlendNormal);
blend.init(true); blend.init(true);
scissorTest.init(false); scissorTest.init(false);
scissorBox.init(IntRect(0, 0, 640, 480)); scissorBox.init(IntRect());
program.init(0); program.init(0);
if (conf.maxTextureSize > 0) if (conf.maxTextureSize > 0)

View File

@ -152,6 +152,7 @@ public:
pp.startRender(); pp.startRender();
glState.viewport.set(IntRect(0, 0, w, h)); glState.viewport.set(IntRect(0, 0, w, h));
glState.scissorBox.pushSet(IntRect(0, 0, w, h));
FBO::clear(); FBO::clear();
@ -166,6 +167,8 @@ public:
brightnessQuad.draw(); brightnessQuad.draw();
} }
glState.scissorBox.pop();
} }
void requestViewportRender(const Vec4 &c, const Vec4 &f, const Vec4 &t) void requestViewportRender(const Vec4 &c, const Vec4 &f, const Vec4 &t)