Sign in to follow this  

Loading Screens

This topic is 3742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I make a Mesh loading screen if I'm using D3DXLoadMeshFromX? Can I do this without using multiple threads? The problem as I see it is displaying graphics on screen while waiting for the function to return. Can I do this by not clearing the backbuffer but then how do I add animation in the background of the loading screen?

Share this post


Link to post
Share on other sites
It seems if you want to use D3DXLoadMeshFromX() waiting is just a price you're going to have to pay. Multiple threads will not solve the problem because you'll still have to wait for the mesh to load either way, and a 2nd thread won't speed things up any.
Of course, you could record the loading animation, save it as an avi with a screen capture program, and then play the avi onscreen during loading times which might be faster depending on the level of detail in the mesh you're using.

Share this post


Link to post
Share on other sites
Just render something on screen before you call the loading function - it will stay on screen until your blocking call (the loading function) exits. Assuming you are running in full screen mode - no such guarantee in windowed mode, but who cares. I usually just render a "loading..." sprite with a graphic in the middle of the screen, then do the blocking call, then return to my normal game loop, so the loading screen will get replaced with whatever is actually supposed to be on screen.

Depending on how much control you have over the loading operation, you could not only display the name of mesh currently loading, but also the names of textures and materials.

Share this post


Link to post
Share on other sites
Hey guys,

I will have to move some things around in my code in order to load only the textures necessary for the menus and loading screen before I load in stuff for the actual game.

Cause currently I load in all meshes and textures in one go and that happens before anything else is loaded or displayed which is a problem. But thanks for the suggestions on how to solve the loading screen problem.

Share this post


Link to post
Share on other sites
Yeah, you will want to rewrite your code. You should just load anything needed for your opening screens and main menu (sub menus too) before something is displayed. All this should likely take 1/10th of a second, give or take some. Loaded in the background via a second thread might be an idea, while the first one plays animations/video (otherwise, your animation will be jerky in a lot of cases if you just play a video, or it will flat out freeze up at a frame until the load is done).

I doubt your models/textures are needed every where in your game at all times, likely levels where some things change? You should only load what you need when you need it. What if the person plays a saved game and you've pre-loaded the first level, kind of pointless effort on your part :)

Share this post


Link to post
Share on other sites

This topic is 3742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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