Esempio n. 1
0
        /// <summary>Gets a shader set by name.</summary>
        public static ShaderSet Get(string name)
        {
            ShaderSet result = null;

            if (GlobalCache == null)
            {
                // Create the global cache:
                GlobalCache = new Dictionary <string, ShaderSet>();
            }
            else
            {
                // Load from cache:
                GlobalCache.TryGetValue(name, out result);
            }

            if (result == null)
            {
                // Create and add:
                result = new ShaderSet(name);

                // Push it in:
                GlobalCache[name] = result;
            }

            return(result);
        }
Esempio n. 2
0
 /// <summary>A material with just the single frame on it.</summary>
 public Material GetImageMaterial(ShaderSet shaders)
 {
     return(Contents.GetImageMaterial(shaders.Isolated));
 }
//--------------------------------------