Jump to content
  • Advertisement
Sign in to follow this  
Halsafar

Blt to Backbuffer

This topic is 4773 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 a static background for my games ingame menu. I have yet to see any BLT functions while exploring DX9. I can get the backbuffer surface. I assume there is a D3DXCreateSurfaceFromFile() Is it just like Dx7 from there?

Share this post


Link to post
Share on other sites
Advertisement
To do 2D graphics in 3D, you have a couple of options:

1) Use ID3DXSprite. This is really recommended as long as it works for you.

2) Use textured quads.

There's some more info here

Share this post


Link to post
Share on other sites
I also recommend using ID3DXSprite. What I do is to split my background image into a series of 256x256 or 512x512 images and then draw them in their proper places.

To do 2D with the ID3DXSprite you will first need to set a 2D transformation matrix to the ID3DXSprite object using the ->SetTransform function. I use D3DXMatrixTransformation2D to calculate the matrix. Also if you want to retrieve the current matrix before modifying it you can do so using the ->GetTransform function.

Once the transform is set up all you need to do is call the ->Draw() function.

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!