About Store Forum Documentation Contact



Post Reply 
Correct place to call DrawParticle?
Author Message
fatcoder Offline
Member

Post: #1
Correct place to call DrawParticle?
Just wondering where the correct place is to call DrawParticle (and the others, DrawParticleBegin, DrawParticleAdd, DrawParticleEnd)? I've been calling them at the end of my Draw method (outside of the Renderer), like this.

Code:
void Draw()
{
   Renderer(Render);

   DrawParticle(...);
}

This has been working fine for a long time, however recently (I think since build 12 or 11), it has stopped working. In fact, sometimes I receive random crashes when calling DrawParticleBegin.

Has something changed? Should these actually be called somewhere in the Renderer, perhaps inside RM_BLEND or RM_PALETTE?
08-26-2012 12:40 PM
Find all posts by this user Quote this message in a reply
Rogus Offline
Member

Post: #2
RE: Correct place to call DrawParticle?
I think you should call it in Renderer in RM_OVERLAY or RM_BLEND smile
08-26-2012 12:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: Correct place to call DrawParticle?
I will include that information in the comments.

It can be called only in one of following:
RM_PALETTE, RM_PALETTE1 and RM_BLEND

If you're using Particles class, then it has following method available:
RENDER_MODE renderMode ( )C {return _render_mode ;} // get RENDER_MODE in which Particle Set should be drawn (can be RM_BLEND, RM_PALETTE or RM_PALETTE1)

The same applies to manual drawing particles
08-26-2012 02:10 PM
Find all posts by this user Quote this message in a reply
Post Reply