Example #1
0
        public EffectParameterCollection(EffectTechniqueCollection techniques)
        {
            ThreadingHelper.BlockOnUIThread(() => {
                parameters    = new Dictionary <string, EffectParameter> ();
                parameterList = new List <EffectParameter> ();

                foreach (EffectTechnique technique in techniques)
                {
                    foreach (EffectPass pass in technique.Passes)
                    {
                        pass.CacheParameters();

                        foreach (EffectPassParameter param in pass.Parameters)
                        {
                            EffectParameter current = null;
                            if (!parameters.TryGetValue(param.Name, out current))
                            {
                                current = new EffectParameter(param.Name);
                                Add(current);
                            }
                            current.Add(param);
                        }
                    }
                }
            });
        }
Example #2
0
 public Effect(GraphicsDevice graphicsDevice)
     : base(graphicsDevice)
 {
     Techniques = new EffectTechniqueCollection();
 }