scissors fix

This commit is contained in:
MihailRis
2024-03-16 05:38:30 +03:00
parent b36711593b
commit 23f8ab8a77
+4 -4
View File
@@ -15,6 +15,10 @@ GfxContext::GfxContext(
{} {}
GfxContext::~GfxContext() { GfxContext::~GfxContext() {
if (g2d) {
g2d->flush();
}
while (scissorsCount--) { while (scissorsCount--) {
Window::popScissor(); Window::popScissor();
} }
@@ -22,10 +26,6 @@ GfxContext::~GfxContext() {
if (parent == nullptr) if (parent == nullptr)
return; return;
if (g2d) {
g2d->flush();
}
if (fbo != parent->fbo) { if (fbo != parent->fbo) {
if (fbo) { if (fbo) {
fbo->unbind(); fbo->unbind();