How to use OnPostRender() for GUI elements

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
ceyron
Posts: 63
Joined: Tue Mar 03, 2009 5:10 pm
Location: Bucuresti, România

How to use OnPostRender() for GUI elements

Post by ceyron »

Just a curiosity, did someone actualy use OnPostRender() for animating a GUI element before, because i cannot find any examples on how to use it.

I know it's supposively made for animating things, i've seen the rts camera snippet from the wiki, but i really have no idea when and how to call it (the documentation doesn't help either, what is timeMs :?:...time in ms until...!). Usually i animate my controls only using draw() but if OnPostRender() is really made for animating why not use it, so a example would really be appreciated.

Thanks!
Image
RdR
Competition winner
Posts: 273
Joined: Tue Mar 29, 2011 2:58 pm
Contact:

Re: How to use OnPostRender() for GUI elements

Post by RdR »

If you are implementing your own GUIElement, just implement OnPostRender() for your new element.

timeMs = current time in milliseconds.
You can use timeMs to create FPS independent animations.

Code: Select all

 
void MyGUIElement::OnPostRender(u32 timeMs) {
 // dome something
}
 
Post Reply