collapse_all Collapse AllExpand All     dropdown Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++


[TCheckBoxFormControlObj]Visual Basic

Visual C++
DPSF API Documentation
(<'Particle, Vertex>)>)>..::..InitializeSpriteParticleSystem Method (GraphicsDevice, ContentManager, Int32, Int32, Texture2D, SpriteBatch)

Initializes a new Sprite Particle System

Namespace: DPSF

Assembly: DPSF (in DPSF.dll) Version:



public void InitializeSpriteParticleSystem(

 GraphicsDevice cGraphicsDevice,

 ContentManager cContentManager,

 int iNumberOfParticlesToAllocateMemoryFor,

 int iMaxNumberOfParticlesToAllow,

 Texture2D cTexture,

 SpriteBatch cSpriteBatchToDrawWith


Visual Basic

Public Sub InitializeSpriteParticleSystem (

 cGraphicsDevice As GraphicsDevice,

 cContentManager As ContentManager,

 iNumberOfParticlesToAllocateMemoryFor As Integer,

 iMaxNumberOfParticlesToAllow As Integer,

 cTexture As Texture2D,

 cSpriteBatchToDrawWith As SpriteBatch


Visual C++


void InitializeSpriteParticleSystem(



 int iNumberOfParticlesToAllocateMemoryFor,

 int iMaxNumberOfParticlesToAllow,






Type: GraphicsDevice

Graphics Device to draw to


Type: ContentManager

Content Manager used to load Effect files and Textures


Type: System..::..Int32

The Number of Particles memory should be Allocated for. If the Auto Memory Manager is enabled (default), this will be dynamically adjusted at run-time to make sure there is always roughly as much Memory Allocated as there are Particles. This value may also be adjusted manually at run-time.


Type: System..::..Int32

The Maximum Number of Active Particles that are Allowed at a single point in time. If the Auto Memory Manager will not be enabled to increase memory, this should be less than or equal to the Number Of Particles To Allocate Memory For, as the Particle System can only handle as many Particles as it has Memory Allocated For. Also, the Auto Memory Manager will never increase the Allocated Memory to handle more Particles than this value. If this is set to a value lower than the Number Of Particles To Allocate Memory For, then only this many Particles will be allowed, even though there is memory allocated for more Particles. This value may also be adjusted manually at run-time.


Type: Texture2D

The Texture to use to visualize the Particles


Type: SpriteBatch

The Sprite Batch that this particle system should use to draw its particles with.

If null, the particle system will use its own SpriteBatch to draw its particles.

If not null, then you must call SpriteBatch.Begin() before calling ParticleSystem.Draw() to draw the particle system, and then call SpriteBatch.End() when done drawing the particle system.

collapse_allSee Also

DPSF<(Of <(<'Particle, Vertex>)>)> Class

DPSF<(Of <(<'Particle, Vertex>)>)> Members

InitializeSpriteParticleSystem Overload

DPSF Namespace


Send comments on this topic to