Moved the assignment of the ModifiedCount to before GL texture calls.

This commit is contained in:
Robert Osfield
2017-10-19 20:57:25 +01:00
parent 8965c9369e
commit 24c2a0ca60
7 changed files with 28 additions and 27 deletions

View File

@@ -204,10 +204,10 @@ void TextureRectangle::apply(State& state) const
}
else if (_image.valid() && getModifiedCount(contextID) != _image->getModifiedCount())
{
applyTexImage_subload(GL_TEXTURE_RECTANGLE, _image.get(), state, _textureWidth, _textureHeight, _internalFormat);
// update the modified count to show that it is up to date.
getModifiedCount(contextID) = _image->getModifiedCount();
applyTexImage_subload(GL_TEXTURE_RECTANGLE, _image.get(), state, _textureWidth, _textureHeight, _internalFormat);
}
}
else if (_subloadCallback.valid())