The following code will never display a texture as long as "SetNonBlocking" is enabled unless the texture is loaded elsewhere.
Lua Code:
local tx = UIParent:CreateTexture()
tx:SetPoint('CENTER')
tx:SetSize(64, 64)
tx:SetNonBlocking(true)
local switch = true
local texture1, texture2 = 'interface/icons/inv_mushroom_10', 'interface/icons/inv_mushroom_11'
CreateFrame('frame'):SetScript('OnUpdate', function()
tx:SetTexture(switch and texture1 or texture2)
switch = not switch
end)
If you use a single texture it will load but switching between two textures every other frame appears to prevent it from ever completing the loading process.