Jump to content
  • Advertisement

Archived

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

trekey19966

Back_Buffer

This topic is 5961 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 load a 16 bit Bitmap into the back_buffer?and flip it to the primary_buffer in a 2D game Edited by - trekey19966 on February 20, 2002 8:14:27 PM

Share this post


Link to post
Share on other sites
Advertisement
Well, if you have some code for loading a bitmap, then you could do this:
- Get an interface to the back buffer with: Device.GetBackBuffer
- Lock the back buffer with: BackBuffer.LockRect
- Load in the bitmap info
- Unlock the back buffer
Where: Device is a device (surprisingly), BackBuffer is an IDirect3DSurface8 object that you setup with Device.GetBackBuffer.
This is assuming that you''re using Direct3D 8

But, I wouldn''t do this myself, I would load the bitmap into a texture, and use a quad to put it in the back buffer (probably with some 2D wrapper classes to make it easy for me).

I don''t know what the best way is though.

John B

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!