Archived

This topic is now archived and is closed to further replies.

D3D8 Backgrounds/Animation

This topic is 5674 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

Hi all, I am sorry if this question has already been asked before, but I have not seen it. I actually have a few questions. First, if I draw nothing to the screen but the framerate, I will get some incredibly huge number, like 500 or something. This makes sense. However, if I move to JUST drawing a background image (800x600 @ 32 bit color detph), my framerate drops to like 54!!! This seems entirely insane that the framerate would drop so much for drawing one thing...The only other option I could figure out would be to draw the background once, and then only redraw little pieces of it when other things are drawn on top of it and move around, animate, etc. Is this the right way to go about doing it? Or is there some other much nicer way which I am completely missing? Any advice on how to accomplish this would be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
This is strange as the values you state (500 fps - 54 fps) is a massive drop just because you are rendering a background image... how are you putting this background to the screen.

However, as a general rule, there is typically a large difference in frame rate between drawing *nothing* to the screen and drawing *something* to the screen. As an example a small skybox example app I wrote recently would run at ~400 fps... which dropped down to about 200 fps when I rendered just the skybox. Of course these values depend on the underlying hardware, and the ability of the programmer to a large degree!

Sharky

Share this post


Link to post
Share on other sites
Thanks!! This was such an obvious solution, I don''t know why I didn''t try it... Especially since I had been using it for all my other drawing. I am now drawing the background using the ID3DXSprite interface also and its great! I didn''t know that it would automatically take care of only redrawing the portions of the stuff on top of it that it needs to. But it is now running at 250+ fps.

Share this post


Link to post
Share on other sites