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

This commit is contained in:
Stefan Dösinger 2006-04-01 19:34:20 +02:00 committed by Alexandre Julliard
parent edc34a3cbc
commit a7063774b9
1 changed files with 0 additions and 10 deletions

View File

@ -275,16 +275,6 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
/* Bind the texture */
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);
checkGLcall("glBindTexture");
if (isNewTexture) {