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.
This commit is contained in:
parent
a795c450bb
commit
23abcffbc5
1 changed files with 1 additions and 1 deletions
|
@ -402,7 +402,7 @@ void OpenGLGraphicsManager::updateScreen() {
|
|||
|
||||
// Update changes to textures.
|
||||
_gameScreen->updateGLTexture();
|
||||
if (_cursor) {
|
||||
if (_cursorVisible && _cursor) {
|
||||
_cursor->updateGLTexture();
|
||||
}
|
||||
_overlay->updateGLTexture();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue