Page 1 of 1

Splash screen

Posted: Mon Dec 13, 2004 4:31 pm
by Tom87@21
Hi ! 8)
I'm searching for informations about how to draw a splash screen with Irrlicht while its driver is loading textures, vertices and other stuffs.

Thanks !

Posted: Mon Dec 13, 2004 4:55 pm
by Guest
why dont u have a function to load all those things, and while that function executes display the splash screen?

Posted: Mon Dec 13, 2004 6:45 pm
by bal
Indeed, just like in the Techdemo. Just replace the loading screen with your splashscreen.

Posted: Mon Dec 13, 2004 7:13 pm
by Tyn
No! Not like the tech demo. The tech demo runs on time, which means that loading done or not, you will be put into the program.

What you want to do is draw your splash screen, render one frame ( just go through your render loop once ) and then call a function to load the resources. When the function is finished and all the resources are loaded, you can hide the splash screen and get on with your program.

Posted: Mon Dec 13, 2004 8:12 pm
by Haeal
Well, the easy answer would be threading. Making threads in C is quite easy, and there's quite a few libraries out there that would make it less of a daunting task to learn how they work. I used the wefts library to start my learning with threading (http://wefts.sourceforge.net/ Does it in a nice object oriented way).

Startup the thread that does your loading, go into the draw loop, and get the thread to set a flag or have some other form of detection to tell when you're done, then move on from your splash screen.

Ideas ?

Posted: Tue Dec 14, 2004 7:41 pm
by Tom87@21
I've already tried to use threads, but it makes a fatal failure in Windows XP.
(if you could write a little bit of code, just to see how you would do that)

I've already tried to draw the "please wait" image before loading other datas, but it draw nothing : the image is loaded (it's wrote in the log), but nothing appears before entering in the main draw loop.

I would like to use a splash screen, before my app will run on a Pentium II 200 MHz :? , and the time that it loads all the images... is a bit long. (-> it will be a computer of my school, where I will run a little demo :D )[/u]

Posted: Tue Dec 14, 2004 8:23 pm
by StickyBit
You might wanna take a look on this one:

http://www.castle.schimkat.dk/

.. which has a simple splashscreen.

Kind regards Sticky