From 23abcffbc5bc2f3e74d4725af1d292db0421054b Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 7 May 2017 18:08:03 +0200 Subject: OPENGL: Don't update the cursor's texture when the cursor is invisible Updating the cursor's texture is not necessary if it is not going to be drawn. Fixes glDrawArrays sometimes failing due to using a framebuffer with an incomplete color attachment. In SCI32 games, the framebuffer is incomplete because the engine does not define pixel data for the cursor. --- backends/graphics/opengl/opengl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index b239802a0f..a595d076db 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -402,7 +402,7 @@ void OpenGLGraphicsManager::updateScreen() { // Update changes to textures. _gameScreen->updateGLTexture(); - if (_cursor) { + if (_cursorVisible && _cursor) { _cursor->updateGLTexture(); } _overlay->updateGLTexture(); -- cgit v1.2.3