/// <summary>
        /// Gets the <see cref="BuiltInShader"/> for the specified <see cref="BuiltInShaderType"/>
        /// </summary>
        /// <param name="type">Built in shader type</param>
        /// <returns>An instance of the specified built in shader</returns>
        public BuiltInShader GetShader(BuiltInShaderType type)
        {
            // Check if we have an entry for this shader type.
            if (this.Shaders.ContainsKey(type) == false)
            {
                return(null);
            }

            // Return the shader instance.
            return(this.Shaders[type]);
        }
Ejemplo n.º 2
0
 public BuiltInShader GetBuiltInShader(BuiltInShaderType type)
 {
     // Get the shader from the shader collection.
     return(this.shaderCollection.GetShader(type));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// One of <see cref="BuiltInShaderType"/> that this shader maps to
 /// </summary>
 /// <param name="type">Type of built in shader</param>
 public BuiltInShaderAttribute(BuiltInShaderType type)
 {
     // Initialize fields.
     this.ShaderType = type;
 }