Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DPSFDefaultEffect"/> class.
 /// </summary>
 /// <param name="effectToClone">The effect to clone.</param>
 public DPSFDefaultEffect(DPSFDefaultEffect effectToClone)
     : this(effectToClone.GraphicsDevice, effectToClone._configuration)
 {
     // Copy the Effect Parameters into this Effect
     this.ColorBlendAmount = effectToClone.ColorBlendAmount;
     this.Texture          = effectToClone.Texture;
     this.World            = effectToClone.World;
     this.View             = effectToClone.View;
     this.Projection       = effectToClone.Projection;
 }
Example #2
0
        /// <summary>
        /// Virtual function to Set the Effect's Parameters before drawing the Particles
        /// </summary>
        protected override void SetEffectParameters()
        {
            // Specify the World, View, and Projection Matrices
            DPSFDefaultEffect effect = this.Effect as DPSFDefaultEffect;

            if (effect != null)
            {
                effect.World      = this.World;
                effect.View       = this.View;
                effect.Projection = this.Projection;
            }
        }
Example #3
0
        /// <summary>
        /// Virtual function to Set the Effect's Parameters before drawing the Particles
        /// </summary>
        protected override void SetEffectParameters()
        {
            DPSFDefaultEffect effect = this.Effect as DPSFDefaultEffect;

            if (effect != null)
            {
                // Specify the World, View, and Projection Matrices to use, as well as the Texture to use
                effect.World      = this.World;
                effect.View       = this.View;
                effect.Projection = this.Projection;
                effect.Texture    = this.Texture;
            }
        }