Sign in to follow this  

[MDX] Direct3D background bitmap possible?

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

What is the best way to put a background image with Managed D3D? I am making a windowed game with mdx, now I need to add a background to the window... how? Bunch of sprites? Window can be resized and I would like to have the background image to scale to fit. Thanks.

Share this post


Link to post
Share on other sites
Yes, I thought of that. But what does that mean? Loading a 512x512 image, or 1024x1024? and stretching it? I was just wondering if there was a "clear" method that would clear the device with an image rather than a color. Sigh... I remember the good ol' 2D days... :(

Share this post


Link to post
Share on other sites
The image wouldn't need to be a power of two as you wouldn't need mipmapping. The common approach for a single large background image would be to just load an image (say 800x600 jpg) and apply it to a pre-transformed quad (as hplus0603 said). You would also disable the zbuffer before drawing the quad and then enable it again afterwards (this would be for drawing the background first and having everything else drawn later be drawn over it).

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Hmm, so loading the 800x600 texture without mipmap or other features will not force it to resize? Ok, I'll try it. I am just scared of compatibility issues with some video card. Ok, thanks for the info.

BTW ViLiO, I love that Rygar icon... brings back lots of good memories. :)

Share this post


Link to post
Share on other sites

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