DPSF 2.3.0 to 2.4.0
|Top Previous Next|
1 - Changed the ParticleEmitterCollection's Add() function to return back the new ParticleEmitter object, rather than the new object's ID.
If you were previously doing:
int id = Emitters.Add(newEmitter);
you will need to change it to:
int id = Emitters.Add(newEmitter).ID;
2 - Fixed the DefaultSpriteParticleSystem to draw transparency.
The DefaultSpriteParticleSystem was updated to use BlendState.NonPremultipled by default so that transparency is drawn. So if you were inheriting from this particle system, your particle may no longer be fully opaque. To fix this problem you can either:
1. Update your particle system's Initialize Particle Function and Particle Update Functions to ensure that they do not change the particle color's alpha value (i.e. transparency value).
2. Add the following code to your particle system to reintroduce the old bug so that your particles are drawn the same way as before.
protected override void InitializeRenderProperties()
RenderProperties.BlendState = DPSFHelper.CloneBlendState(BlendState.AlphaBlend);
Obviously option #1 is preferred/recommended approach.
3 - Renamed IndexBufferReach to IndexBufferShort.
If you were writing your own Vertex Update Function, you may need to update it to reference the IndexBufferShort array instead of the old IndexBufferReach array.
This array was renamed because even though MonoGame for WinRT does not use the Reach profile, it still needs to use the Short Index Buffer array.
4 - When writing to the Index Buffer, you should check IsUsingIntegerIndexBuffer instead of using "this.GraphicsDevice.GraphicsProfile == GraphicsProfile.HiDif".
If you were writing your own Vertex Update Function, you may need to update how it checks which Index Buffer to write to. It should now simply check the particle system's IsUsingIntegerIndexBuffer property to determine whether to write to the IndexBuffer or IndexBufferShort array.
This change was made because even though MonoGame for WinRT does not use the Reach profile, it still needs to use the Short Index Buffer array.