예제 #1
0
 public void Release(string key)
 {
     lock (_shaderPrograms)
     {
         CachedShaderProgram cachedShaderProgram = _shaderPrograms[key];
         if (--cachedShaderProgram.ReferenceCount == 0)
         {
             _shaderPrograms.Remove(key);
             cachedShaderProgram.ShaderProgram.Dispose();
         }
     }
 }