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

@@ -297,8 +297,8 @@ void Texture2DArray::apply(State& state) const
{
if (getModifiedCount(n,contextID) != image->getModifiedCount())
{
applyTexImage2DArray_subload(state, image, n, _textureWidth, _textureHeight, image->r(), _internalFormat, _numMipmapLevels);
getModifiedCount(n,contextID) = image->getModifiedCount();
applyTexImage2DArray_subload(state, image, n, _textureWidth, _textureHeight, image->r(), _internalFormat, _numMipmapLevels);
}
n += image->r();
}
@@ -380,8 +380,8 @@ void Texture2DArray::apply(State& state) const
{
if (getModifiedCount(n,contextID) != image->getModifiedCount())
{
applyTexImage2DArray_subload(state, image, n, _textureWidth, _textureHeight, image->r(), _internalFormat, _numMipmapLevels);
getModifiedCount(n,contextID) = image->getModifiedCount();
applyTexImage2DArray_subload(state, image, n, _textureWidth, _textureHeight, image->r(), _internalFormat, _numMipmapLevels);
}
n += image->r();
}