Loading screen

Wessel

Newcomer
Joined
Nov 14, 2003
Messages
20
Location
The Netherlands
Hi,

I'm creating a simple game in Direct3D. I would like to show a loading screen while my program loads up resources like textures and scripts. The problem is, while my program is busy loading resources, there isn't any rendering taking place so I cannot show a progressbar or anything. I'm rendering within a window using the Invalidate method. How should I handle this? Should I load one resource at a time per frame cycle?

Thanks in advance for your reply.
 
My suggestion is that if you are going to use a progress bar then, do a render whilst loading the resources. e.g.
Code:
device.BeginScene()
' Update progressbar (not sure if your using a vertex)
device.EndScene()
device.Present()

' Load texture resources
'....
device.BeginScene()
' Update progressbar
device.EndScene()
device.Present()
' Load model resources
'...
device.BeginScene()
' Update progressbar
device.EndScene()
device.Present()
'etc.....
 
Thanks for your code, but I made the choice of loading one resource each frame cycle, this is still fast enough. It may not be the most ideal method but it fits best in my design I think.
 
Back
Top