mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()

If we deleted a currently bound texture, we were always reverting the texture
binding to the default 1D texture rather than the proper default texture.
This commit is contained in:
Brian Paul
2009-10-02 09:55:07 -06:00
parent 85ee0ef9a7
commit e1bddd159f

View File

@@ -863,7 +863,7 @@ unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
if (texObj == unit->CurrentTex[tex]) {
_mesa_reference_texobj(&unit->CurrentTex[tex],
ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]);
ctx->Shared->DefaultTex[tex]);
ASSERT(unit->CurrentTex[tex]);
break;
}