Restructured the way that applyTexParameters() is applied to address issues with Intel drivers not handling mipmap generations unless the tex parameters are reapplied on new upload of data.
This commit is contained in:
@@ -193,11 +193,10 @@ void Texture2D::apply(State& state) const
|
||||
{
|
||||
textureObject->bind();
|
||||
|
||||
if (getTextureParameterDirty(state.getContextID()))
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
|
||||
if (_subloadCallback.valid())
|
||||
{
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
|
||||
_subloadCallback->subload(*this,state);
|
||||
}
|
||||
else if (_image.valid() && getModifiedCount(contextID) != _image->getModifiedCount())
|
||||
@@ -205,6 +204,8 @@ void Texture2D::apply(State& state) const
|
||||
// update the modified tag to show that it is up to date.
|
||||
getModifiedCount(contextID) = _image->getModifiedCount();
|
||||
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
|
||||
applyTexImage2D_subload(state,GL_TEXTURE_2D,_image.get(),
|
||||
_textureWidth, _textureHeight, _internalFormat, _numMipmapLevels);
|
||||
}
|
||||
@@ -213,6 +214,9 @@ void Texture2D::apply(State& state) const
|
||||
_readPBuffer->bindPBufferToTexture(GL_FRONT);
|
||||
}
|
||||
|
||||
if (getTextureParameterDirty(state.getContextID()))
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
|
||||
}
|
||||
else if (_subloadCallback.valid())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user