Rendering/Refreshing a Particle Engine

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Will Piovano
Posts: 22
Joined: Sun Oct 15, 2006 10:02 pm

Rendering/Refreshing a Particle Engine

Post by Will Piovano »

Hey,

I've got a little game with dice rolling around on a board. There are several particle engines in use. Problem is, when I roll a die, I'm looping the rotation animation, and so the particle engines freeze.

What I don't understand is that I can call Render() as many times as I want, but the particle engine does not display until the rolling function exits to the main run() loop. But run just loops Render()...

On another example, I have a spaceship mesh flying around with a particle engine in tow. Since I update the position in the Render() function, which is called repeatedly during the die roll, the ship continues moving, but the particle engine freezes in space. I can't update it in Render() because the particle engine handles itself. I even tried running it in a different thread but that doesn't work either.

Any way to force Irrlicht to render the PE frames then?

Thanks
Will Piovano
Posts: 22
Joined: Sun Oct 15, 2006 10:02 pm

Post by Will Piovano »

Nobody? I've got all sorts of problems related to this, would be immense help if someone had a solution!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

there are three stages to rendering a scene node, OnPreRender, render and OnPostRender. you need to call all 3 if you want them to behave properly
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Will Piovano
Posts: 22
Joined: Sun Oct 15, 2006 10:02 pm

Post by Will Piovano »

I see. But is it enough to call all three functions to render that frame of the PE? I read the documentation and it says you can register a node to be rendered; do I have to register my pe?

Thanks bitplane.

P.S.
This animation quite a plight as the light of my spaceship freezes as the ship goes away, the jets on the board go solid and the animation of the die never happens until the move is done. lol
Post Reply