Axiom.Graphics.Technique.ApplyTextureAliases C# (CSharp) Méthode

ApplyTextureAliases() public méthode

public ApplyTextureAliases ( string>.Dictionary aliasList, bool apply ) : bool
aliasList string>.Dictionary
apply bool
Résultat bool
		public bool ApplyTextureAliases( Dictionary<string, string> aliasList, bool apply )
		{
			// iterate through all passes and apply texture aliases
			bool testResult = false;

			foreach ( Pass p in _passes )
			{
				if ( p.ApplyTextureAliases( aliasList, apply ) )
					testResult = true;
			}

			return testResult;

		}

Usage Example

        /// <summary>
        ///		Applies texture names to Texture Unit State with matching texture name aliases.
        ///		All techniques, passes, and Texture Unit States within the material are checked.
        ///		If matching texture aliases are found then true is returned.
        /// </summary>
        /// <param name="aliasList">A map container of texture alias, texture name pairs.</param>
        /// <param name="apply">Set to true to apply the texture aliases else just test to see if texture alias matches are found.</param>
        /// <returns>True if matching texture aliases were found in the material.</returns>
        public bool ApplyTextureAliases(Dictionary <string, string> aliasList, bool apply)
        {
            bool testResult = false;

            // iterate through all techniques and apply texture aliases
            for (int i = 0; i < techniques.Count; i++)
            {
                Technique technique = (Technique)techniques[i];
                if (technique.ApplyTextureAliases(aliasList, apply))
                {
                    testResult = true;
                }
            }
            return(testResult);
        }