Exemplo n.º 1
0
 public static void RemoveTexture(TextureHandle handle)
 {
     mDefaultManager._RemoveTexture(handle);
 }
Exemplo n.º 2
0
 public void UnloadTexture(TextureHandle handle)
 {
     _RemoveTexture(handle);
 }
Exemplo n.º 3
0
        private void _RemoveTexture(TextureHandle handle)
        {
            lock (lockObject)
            {
                if (mRefCounts.ContainsKey(handle) == false)
                    return;

                --mRefCounts[handle];
                if (mRefCounts[handle] == 0)
                {
                    Game.GameManager.GraphicsThread.CallOnThread(() => handle.Native.Dispose(), true);
                    mRefCounts.Remove(handle);
                    mTextures.Remove(handle.Name.GetHashCode());
                }
            }
        }