/** Points to highest priority, complete and enabled texture object */
struct gl_texture_object *_Current;
+
+ /** Texture targets that have a non-default texture bound */
+ GLbitfield _BoundTextures;
};
_mesa_reference_texobj(&unit->CurrentTex[tex],
ctx->Shared->DefaultTex[tex]);
ASSERT(unit->CurrentTex[tex]);
+ unit->_BoundTextures &= ~(1 << tex);
break;
}
}
ctx->Texture.CurrentUnit + 1);
ASSERT(texUnit->CurrentTex[targetIndex]);
+ if (texName != 0)
+ texUnit->_BoundTextures |= (1 << targetIndex);
+ else
+ texUnit->_BoundTextures &= ~(1 << targetIndex);
+
/* Pass BindTexture call to device driver */
if (ctx->Driver.BindTexture)
ctx->Driver.BindTexture(ctx, target, newTexObj);
MAX2(dst->Texture.NumCurrentTexUsed, u + 1);
}
}
+ dst->Texture.Unit[u]._BoundTextures = src->Texture.Unit[u]._BoundTextures;
_mesa_unlock_context_textures(dst);
}
}
_mesa_reference_texobj(&texUnit->CurrentTex[tex],
ctx->Shared->DefaultTex[tex]);
}
+
+ texUnit->_BoundTextures = 0;
}