Jump to content
  • Advertisement


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


Best way to draw a 16 bit dib

This topic is 6983 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 fastest way to reliably place a dib onto the screen?

Windows has a whole heap of ways to achieve this.

BitBlt works, and works well on some systems. but appallingly on other systems. On a system with an i740 it took 1.5Million clocks to put the 640x480 dib onscreen. On my system (also an i740) it takes 3.5M clocks.
On one system however it takes 37M clocks to do the blit.

All blits are going onto 16 bit displays. I can only assume that diffent drivers and different bit orderings affect the speed greatly.

is SetDIBitsToDevice any better or more consistant. How about DirectDraw functions.

I'm pretty much only going to be rendering into 565 RGB color. I'm prepared to render directly into a directdraw surface only if I can be guaranteed a 565 Surface.

If I cant't be guaranteed a 565 Surface then I'll render into system memory. Does DirectDraw provide any blit functions to to the bit remap faster than BitBlt.

Any help/comments would be appreciated.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
You can't rely on 565 - the HW sets this, and most gfx boards support either 555 or 565, but not both.

Bitblt sucks big time, DX is generally faster and lets you decide for yourself if you wish to use HW blits in video mem, or SW in system mem.. DX essentially gives you a pointer to a chunk of memory, and the rest is up to you.

The penalty for the fast display access is the need to deal with pixel formats etc., but it IS well worth it...


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!