projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50694ee
)
fix bug in _mesa_IsTexture()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 21 Dec 2004 15:13:41 +0000
(15:13 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 21 Dec 2004 15:13:41 +0000
(15:13 +0000)
src/mesa/main/texobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texobj.c
b/src/mesa/main/texobj.c
index 079a0607c6fd2a00e5c66fa23385fab5e3480892..4c2fd1017ce51fa3242bfdcba082ffffbd302b7b 100644
(file)
--- a/
src/mesa/main/texobj.c
+++ b/
src/mesa/main/texobj.c
@@
-1021,9
+1021,18
@@
_mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
GLboolean GLAPIENTRY
_mesa_IsTexture( GLuint texture )
{
+ struct gl_texture_object *t;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- return texture > 0 && _mesa_HashLookup(ctx->Shared->TexObjects, texture);
+
+ if (!t)
+ return GL_FALSE;
+
+ t = (struct gl_texture_object *)
+ _mesa_HashLookup(ctx->Shared->TexObjects, texture);
+
+ /* IsTexture is true only after object has been bound once. */
+ return t && t->Target;
}
/*@}*/