diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-07-27 14:30:50 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-07-27 14:30:50 +0000 |
commit | dae1774e206188d951332d2285ea9cf8796d1a64 (patch) | |
tree | e839658f5ae697d8f5e3f43d9a79e15749c2d742 /src/mesa | |
parent | 086f1b8428dc9108d7186225c31ac1a13fe90c70 (diff) |
check if deleting _Current texobj in _mesa_DeleteTextures (Bart Barenbrug)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texobj.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 7f46619203..a0af0f25ab 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1,4 +1,4 @@ -/* $Id: texobj.c,v 1.49 2001/06/13 14:56:14 brianp Exp $ */ +/* $Id: texobj.c,v 1.50 2001/07/27 14:30:50 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -495,18 +495,26 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *texName) if (delObj == unit->Current1D) { unit->Current1D = ctx->Shared->Default1D; ctx->Shared->Default1D->RefCount++; + if (delObj == unit->_Current) + unit->_Current = unit->Current1D; } else if (delObj == unit->Current2D) { unit->Current2D = ctx->Shared->Default2D; ctx->Shared->Default2D->RefCount++; + if (delObj == unit->_Current) + unit->_Current = unit->Current2D; } else if (delObj == unit->Current3D) { unit->Current3D = ctx->Shared->Default3D; ctx->Shared->Default3D->RefCount++; + if (delObj == unit->_Current) + unit->_Current = unit->Current3D; } else if (delObj == unit->CurrentCubeMap) { unit->CurrentCubeMap = ctx->Shared->DefaultCubeMap; ctx->Shared->DefaultCubeMap->RefCount++; + if (delObj == unit->_Current) + unit->_Current = unit->CurrentCubeMap; } } ctx->NewState |= _NEW_TEXTURE; |