Exemplo n.º 1
0
 public void SetProperty(string name, Matrix value)
 {
     if (MatrixDict.ContainsKey(name))
     {
         MatrixDict[name] = value;
     }
     else
     {
         MatrixDict.Add(name, value);
     }
     UpdatingResource?.Invoke(this, new UpdateEvent(GenericMaterialVariable.ResourceType.Matrix, name));
 }
Exemplo n.º 2
0
 public void SetSampler(string name, SamplerStateDescription samplerDesc)
 {
     if (SamplerDict.ContainsKey(name))
     {
         SamplerDict[name] = samplerDesc;
     }
     else
     {
         SamplerDict.Add(name, samplerDesc);
     }
     UpdatingResource?.Invoke(this, new UpdateEvent(GenericMaterialVariable.ResourceType.Sampler, name));
 }
Exemplo n.º 3
0
 public void SetProperty(string name, bool value)
 {
     if (FloatDict.ContainsKey(name))
     {
         FloatDict[name] = value ? 1 : 0;
     }
     else
     {
         FloatDict.Add(name, value ? 1 : 0);
     }
     UpdatingResource?.Invoke(this, new UpdateEvent(GenericMaterialVariable.ResourceType.Float, name));
 }
Exemplo n.º 4
0
 public void SetTexture(string name, Stream texture)
 {
     if (TextureDict.ContainsKey(name))
     {
         TextureDict[name] = texture;
     }
     else
     {
         TextureDict.Add(name, texture);
     }
     UpdatingResource?.Invoke(this, new UpdateEvent(GenericMaterialVariable.ResourceType.Texture, name));
 }