Jump to content
  • Advertisement
Sign in to follow this  
2dcoder

Fastest way to draw a full screen image in DX8?

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

I need to emulate a full screen dx7 blit in dx8. Currently I'm using the D3XSprite interface to draw 2 textures on the screen. Using 512x512 textures, one is 512x480 and the other is 128x480 resulting in a 640x480 full screen cover. Is there a faster way? Thanks...

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Is there a faster way?

probably not.

The graphics engine I've written uses a set of TL verticies/triangles, which are effectively the same as what D3DXSprite does under the covers. Any optimizations there are likely to be minor boosts rather than anything substantial.

The only other method I can think of is to use 'stretchrect' (or whatever its called), but I'm not sure that'll be always hardware accelerated.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks, yep, multiple draws is pretty much the only way to do it unless you resort to 1024x1024 textures. :)

Share this post


Link to post
Share on other sites
I can't share the source code to our engine for obvious reasons... but it is possible to create a background drawing routine that'll load from any size file and draw to any size screen with minimal wastage. That is, fitting the texture sizes perfectly and using the most optimal geometry arrangement.

Load the data from the file as a surface, split this into lots of smaller textures (of 2^n sizes) and create according TL-Quad's per texture. Think of the "splitting" as a 2D form of the greedy algorithm...

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!