- tfxTexInfo *ti;
- struct gl_texture_object *tObj;
- int i, where;
-
- tObj = ctx->glCtx->Shared->TexObjectList;
- while (tObj) {
- ti = fxTMGetTexInfo(tObj);
+ struct _mesa_HashTable *textures = ctx->glCtx->Shared->TexObjects;
+ GLuint id;
+
+ for (id = _mesa_HashFirstEntry(textures);
+ id;
+ id = _mesa_HashNextEntry(textures, id)) {
+ struct gl_texture_object *tObj
+ = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+ tfxTexInfo *ti = fxTMGetTexInfo(tObj);