Пример #1
0
        public void Read(BinaryReader br)
        {
            byte numParameters = br.ReadByte();

            if (numParameters > 0)
            {
                Parameters = new FragmentParameter[numParameters];
                for (int i = 0; i < numParameters; i++)
                {
                    FragmentParameter csp = new FragmentParameter(br);
                    Parameters[i] = csp;
                }
            }
            size1   = br.ReadUInt16();
            size2   = br.ReadUInt16();
            RawData = br.ReadBytes(size2);
        }
Пример #2
0
 private void assocParameterByName(FragmentParameter param)
 {
     for (int i = 0; i < ShaderParameters1.Length; i++)
     {
         if (ShaderParameters1[i].Name == param.Name)
         {
             param.SetShaderParameter(ShaderParameters1[i], 1);
         }
     }
     for (int i = 0; i < ShaderParameters2.Length; i++)
     {
         if (ShaderParameters2[i].Name == param.Name)
         {
             System.Diagnostics.Debug.Assert(param.ShaderParameter == null);
             param.SetShaderParameter(ShaderParameters2[i], 2);
         }
     }
 }