Jump to content
  • Advertisement


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



This topic is 6055 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
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.

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!