DirectDraw 16-bit Woes .......................................................

DirectDraw 16-bit Woes .......................................................

Post by george silv » Fri, 15 Nov 1996 04:00:00



We are programming a new simulation program.
We have decided to use sprites stored as 256 colour bitmaps.
The buffer will be a 16-bit DirectDraw surface.

My question is what problems will we face trying to blt the 256 colour
bitmap into the 16-bit buffer?

Also, I have heard that there is a problem with 16-bit surfaces on Windows.
For example, on Windows95 machines it resolve to 5-5-5,
and on WindowsNT, it will go to 5-6-5.

Is this true?
If so, what are the possible solutions?

George

 
 
 

DirectDraw 16-bit Woes .......................................................

Post by Shawn L. Bair » Fri, 15 Nov 1996 04:00:00




Quote:> My question is what problems will we face trying to blt the 256 colour
> bitmap into the 16-bit buffer?

To my knowledge, it is possible that the hardware implementation could
provide such a feature, but DirectDraw will not fall back to software blit
methods if the hardware fails to support it.  Instead, your blit will
simply fail.

Quote:> Also, I have heard that there is a problem with 16-bit surfaces on
Windows.
> For example, on Windows95 machines it resolve to 5-5-5,
> and on WindowsNT, it will go to 5-6-5.

In my experience most displays (but not all) will be 5-6-5 under both.
5-5-5 is the other * format though, and you would be well advised to
account for it as well.

Quote:> Is this true?
> If so, what are the possible solutions?

I would highly suggest that you examine the display you create and compose
your 8-bit images as the proper 5-5-5 or 5-6-5 format in a prephase (either
construct them quickly as it boots or pregenerate them completely before
hand).  It's the only reliable way I know of to get your imagery there and
utilize the speed which makes DirectDraw useful.  (You could, of course,
write your own 8-bit to 16-bit blitting function or use the GDI calls, but
this would seem suboptimal.)
--

Shawn L. Baird (Scarrow)

 
 
 

DirectDraw 16-bit Woes .......................................................

Post by James Sh » Fri, 15 Nov 1996 04:00:00



>We are programming a new simulation program.
>We have decided to use sprites stored as 256 colour bitmaps.
>The buffer will be a 16-bit DirectDraw surface.
>My question is what problems will we face trying to blt the 256 colour
>bitmap into the 16-bit buffer?

You will have to do the conversion by hand.  Use a 256 word look up
table to do it.

Quote:>Also, I have heard that there is a problem with 16-bit surfaces on Windows.
>For example, on Windows95 machines it resolve to 5-5-5,
>and on WindowsNT, it will go to 5-6-5.

It's not determined by NT or 95, it's determined by the graphics card.
The most common formats are 5:5:5, or 5:6:5 either in BGR or RGB
format.  You will have to deal with all of them.

Jim

 
 
 

DirectDraw 16-bit Woes .......................................................

Post by george silv » Sat, 16 Nov 1996 04:00:00


Shawn,

Basically, if I read your email right, even if we are using DirectDraw, our
code is at the mercy of the underlining driver.

If the display uses 5-5-5, then DirectDraw will work in that mode.
If the display uses 5-6-6, then DirectDraw will work in that mode.

Quote:> I would highly suggest that you examine the display you create and
compose
> your 8-bit images as the proper 5-5-5 or 5-6-5 format in a prephase
(either
> construct them quickly as it boots or pregenerate them completely before
> hand).  

Good idea if what you say is true, however we wish to store out our sprite
graphics in a standard way. We are not composing the 256 images on the go.

Isn't there an easier way??

George

> > My question is what problems will we face trying to blt the 256 colour
> > bitmap into the 16-bit buffer?

> In my experience most displays (but not all) will be 5-6-5 under both.
> 5-5-5 is the other * format though, and you would be well advised
to
> account for it as well.

> --

> Shawn L. Baird (Scarrow)

 
 
 

1. DirectDraw 16-bit Woes .......................................................

We are programming a new simulation program.
We have decided to use sprites stored as 256 colour bitmaps.
The buffer will be a 16-bit DirectDraw surface.

My question is what problems will we face trying to blt the 256 colour
bitmap into the 16-bit buffer?

Also, I have heard that there is a problem with 16-bit surfaces on Windows.
For example, on Windows95 machines it resolve to 5-5-5,
and on WindowsNT, it will go to 5-6-5.

Is this true?
If so, what are the possible solutions?

George

2. provider needs some grafic designer !!

3. Soft Transparency/Alpha in glDrawPixels()

4. 16-bit additive- and alphablending in DirectDraw

5. Resampling images

6. 16 bit image to 256 or 16 color

7. VCR capture

8. 24/16 bit--> 8 bit PICTS

9. how to do 8 bit to 16 bit rgb expansion

10. dithering 16 bit QT .moov to 8 bit

11. 16 bit targa file to 24 bit targa file

12. Upgrading 16-bit Hicolor to 24-bit Truecolor