Dim x, y As Double
gl.glEnable(Gl.GL10_BLEND)
Gl.glBlendFunc(Gl.GL10_SRC_ALPHA, Gl.GL10_ONE_MINUS_SRC_ALPHA)
Camera.Update
vector.ProjectionMatrix = Camera.Combined
vector.Begin(vector.SHAPETYPE_Filled)
'Each particle must belong to an actor
For Each character As GameCharacter In CharacterList
For Each actor As Actor In character.actor
If actor.isParticlesActive Then
vector.Color = IfTrue(actor.particleColor1 <> actor.particleColor2 And frameCount mod 2 = 0, actor.particleColor1, actor.particleColor2)
For Each p As GameParticle In actor.particles
If p.active Then
x = cam.offsetX + p.x - actor.particleHalfSize
y = cam.offsetY + p.y - actor.particleHalfSize
vector.Rect(x, y, p.size, p.size)
End If
Next
'This function takes care of updating the velocity and position vectors, as well as deactivating any "outOfMap" particles
actor.ParticlesUpdate(LGStep)
End If
Next
Next
vector.end
Gl.glDisable(Gl.GL10_BLEND)