Esempio n. 1
0
 // Create uninitialized Material. Param List will be stored, but Params have no value set.
 // You will need to set the value before using the material.
 public MaterialX(ShaderProgram program)
 {
     _sp   = program;
     _list = new Dictionary <string, ParamPair>();
     foreach (KeyValuePair <string, ShaderParamInfo> k in _sp._paramsByName)
     {
         var pair = new ParamPair
         {
             ParamInfo = k.Value,
             Value     = null             //_sp._rci.GetParamValue(program._spi, k.Value.Handle)
         };
         _list.Add(k.Key, pair);
     }
 }
 // Create uninitialized Material. Param List will be stored, but Params have no value set.
 // You will need to set the value before using the material.
 public MaterialX(ShaderProgram program)
 {
     _sp = program;
     _list = new Dictionary<string, ParamPair>();
     foreach (KeyValuePair<string, ShaderParamInfo> k in _sp._paramsByName)
     {
         var pair = new ParamPair
                        {
                            ParamInfo = k.Value,
                            Value = null  //_sp._rci.GetParamValue(program._spi, k.Value.Handle)
                        };
         _list.Add(k.Key, pair);
     }
 }