fixed return val bug in glAreTexturesResident()

This commit is contained in:
Brian Paul
2000-08-02 20:16:03 +00:00
parent 6f173cafbd
commit bd0f7f42d6

View File

@@ -1,3 +1,4 @@
/* $Id: texobj.c,v 1.25 2000/08/02 20:16:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -639,12 +640,11 @@ _mesa_AreTexturesResident( GLsizei n, const GLuint *texName,
GLboolean *residences)
{
GET_CURRENT_CONTEXT(ctx);
GLboolean resident = GL_TRUE;
GLboolean allResident = GL_TRUE;
GLint i;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx,
"glAreTexturesResident",
GL_FALSE);
"glAreTexturesResident", GL_FALSE);
if (n < 0) {
gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)");
return GL_FALSE;
@@ -659,17 +659,21 @@ _mesa_AreTexturesResident( GLsizei n, const GLuint *texName,
t = (struct gl_texture_object *)
_mesa_HashLookup(ctx->Shared->TexObjects, texName[i]);
if (t) {
if (ctx->Driver.IsTextureResident)
if (ctx->Driver.IsTextureResident) {
residences[i] = ctx->Driver.IsTextureResident(ctx, t);
else
if (!residences[i])
allResident = GL_FALSE;
}
else {
residences[i] = GL_TRUE;
}
}
else {
gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)");
return GL_FALSE;
}
}
return resident;
return allResident;
}