Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

My suggestion is that if you are going to use a progress bar then, do a render whilst loading the resources. e.g.


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.....

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...