From 4063e7aa9d052c973658cd78f7db549a224bd155 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Thu, 11 May 2017 12:20:08 +0200 Subject: [PATCH] Graphics: Use proper resizing function for TEXFBOs Manually resizing the contained TEX objects skips updating the width/height TEXFBO properties, which GLMeta::blit relies on. --- src/graphics.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/graphics.cpp b/src/graphics.cpp index d205697..8a6301a 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -92,11 +92,9 @@ struct PingPong { screenW = width; screenH = height; + for (int i = 0; i < 2; ++i) - { - TEX::bind(rt[i].tex); - TEX::allocEmpty(width, height); - } + TEXFBO::allocEmpty(rt[i], width, height); } void startRender() @@ -946,16 +944,13 @@ void Graphics::resizeScreen(int width, int height) p->screen.setResolution(width, height); - TEX::bind(p->frozenScene.tex); - TEX::allocEmpty(width, height); - TEX::bind(p->currentScene.tex); - TEX::allocEmpty(width, height); + TEXFBO::allocEmpty(p->frozenScene, width, height); + TEXFBO::allocEmpty(p->currentScene, width, height); FloatRect screenRect(0, 0, width, height); p->screenQuad.setTexPosRect(screenRect, screenRect); - TEX::bind(p->transBuffer.tex); - TEX::allocEmpty(width, height); + TEXFBO::allocEmpty(p->transBuffer, width, height); shState->eThread().requestWindowResize(width, height); }