Sign in to follow this  
Ro1

Irrlicht Engine - Retrieving and displaying system time

Recommended Posts

Hi all, Ok so we've been asked to pick a graphics engine for a Uni. assignment, using which we shall be doing a number of things over the coming weeks. I've chosen Irrlicht for this purpose. One requirement I have to complete for this coming week is getting current system time to display in my scene, and no matter how much I search around, I haven't found a single way to achieve this using Irrlicht. I'm guessing it should be something fairly simple, but I just can't get my head around it... I'll admit that I'm no pro, specially since this is my first experience with a graphics engine, so do excuse me if this is a really trivial matter. However, its important to me to find out how to do this, as soon as possible. So anyone out here with any ideas/tips/code, it'd be great if you could help out! Thanks very much in advance :)

Share this post


Link to post
Share on other sites
There is nothing in Irrlicht specifically, but the localtime function is standard C and does what you want.

Or is it the display of the time you're having trouble with, and not the "getting".

Share this post


Link to post
Share on other sites
@ Codeka : Thanks for your response. While I can get the time using standard C++ functionality, its the "displaying in-engine" part that's got me stumped. I need to know a way to show the time inside of my demo app., like a realtime clock.
Any ideas?

Share this post


Link to post
Share on other sites
[SOLVED]

Finally found out a way to use a variable inside of the draw() method for bitmap fonts, and then just passed in the current time retrieved using the standard C++ routine from Codeka's link. Cheers, dude :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this