Commit a7063774 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Do not set the mipmap level count every time a texture is used.

parent edc34a3c
...@@ -275,16 +275,6 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) { ...@@ -275,16 +275,6 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
/* Bind the texture */ /* Bind the texture */
if (This->baseTexture.textureName != 0) { if (This->baseTexture.textureName != 0) {
/* Always need to reset the number of mipmap levels when rebinding as it is
a property of the active texture unit, and another texture may have set it
to a different value */
if (This->baseTexture.levels > 1) {
TRACE("Setting GL_TEXTURE_MAX_LEVEL to %d\n", This->baseTexture.levels - 1);
glTexParameteri(textureDimensions, GL_TEXTURE_MAX_LEVEL, This->baseTexture.levels - 1);
checkGLcall("glTexParameteri(textureDimensions, GL_TEXTURE_MAX_LEVEL, This->baseTexture.levels)");
} else {
glTexParameteri(textureDimensions, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
glBindTexture(textureDimensions, This->baseTexture.textureName); glBindTexture(textureDimensions, This->baseTexture.textureName);
checkGLcall("glBindTexture"); checkGLcall("glBindTexture");
if (isNewTexture) { if (isNewTexture) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment