Jump to content
  • Advertisement

Archived

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

Syntax

Another Bit Depth Question, 32bit?

This topic is 6915 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

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Thank you, but what is the "alpha buffer" what does it do? how does it change the color? or does it?

-Lucas

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!