Another Bit Depth Question, 32bit?

Started by
3 comments, last by Syntax 23 years, 11 months ago
I have recently started porting a small project from windows GDI to Direct Draw Interface, unfortunately my project needs to have a "Put Pixel" routine. Someone has already graciously answered my question on 16/24 bit "Put Pixel" so....... This has me wondering about 32bit depth, what are the advantages of using 32bit, and what exaclty does that extra 8 bits do to the color or Image. I guess the "Alpha" thing has me a bit confused. Any help would once again be greatly appreciated.. -Lucas
-Lucas
Advertisement
The extra 8 bits can be used for the alpha buffer, but usually they are just ignored. The reason for 32 bit instead of 24 is to get 4 byte alignment of each pixel making it much faster for the hardware to access the buffer.



- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thank you, but what is the "alpha buffer" what does it do? how does it change the color? or does it?

-Lucas
-Lucas
You can specify the last 8 bits for an alpha value for transparency.

so a 0 value will be make that color invisible while 255 will make the color opaque. Any between is translucent.

It doesn''t do anything if you do use it..
The alpha buffer doesn''t change the appearance of the framebuffer, even though it may share the same memory. The alpha buffer can be used by Direct3D in blending stages to make polygons transparent as they are rendered on the screen. But this effect is usually made by using an alpha enabled texture on the polygon, so the alpha buffer is seldom needed.

- WitchLord

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement