Exemplo n.º 1
0
 /// <summary>
 /// Resets each of the render properties to their default values.
 /// </summary>
 public void ResetToDefaults()
 {
     // Clone the states instead of just setting to them directly so that they are not read-only and we can change their properties.
     this.BlendState        = DPSFHelper.CloneBlendState(BlendState.AlphaBlend);
     this.DepthStencilState = DPSFHelper.CloneDepthStencilState(DepthStencilState.DepthRead);
     this.RasterizerState   = DPSFHelper.CloneRasterizerState(RasterizerState.CullCounterClockwise);
     this.SamplerState      = DPSFHelper.CloneSamplerState(SamplerState.LinearClamp);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to setup the Render Properties (i.e. BlendState, DepthStencilState, RasterizerState, and SamplerState)
 /// which will be applied to the Graphics Device before drawing the Particle System's Particles.
 /// <para>This function is called when initializing the particle system.</para>
 /// </summary>
 protected override void InitializeRenderProperties()
 {
     // We use the Alpha Test Effect by default for 3D Sprites
     this.Effect = new AlphaTestEffect(this.GraphicsDevice);
     RenderProperties.RasterizerState = DPSFHelper.CloneRasterizerState(RasterizerState.CullNone);
 }