mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
fix bug in _mesa_IsTexture()
This commit is contained in:
parent
50694eeff9
commit
3ec0631e95
1 changed files with 10 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue