🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Best way to draw a 16 bit dib

Started by
0 comments, last by Lerc 24 years, 9 months ago
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.

-That which does not kill us has made its last mistake.
Advertisement
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...

/NJ

This topic is closed to new replies.

Advertisement