aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorBastien Bouclet2017-05-07 18:08:03 +0200
committerBastien Bouclet2017-05-08 06:50:30 +0200
commit23abcffbc5bc2f3e74d4725af1d292db0421054b (patch)
treef5e6126b31969a0435dadeae6288b674e05811ff /backends/graphics
parenta795c450bb1f712abb9e8451beeb086024df2eb7 (diff)
downloadscummvm-rg350-23abcffbc5bc2f3e74d4725af1d292db0421054b.tar.gz
scummvm-rg350-23abcffbc5bc2f3e74d4725af1d292db0421054b.tar.bz2
scummvm-rg350-23abcffbc5bc2f3e74d4725af1d292db0421054b.zip
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.
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp2
1 files changed, 1 insertions, 1 deletions
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();