Jump to content
  • Advertisement


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


Pixel Format Descriptor

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

Ok, so I think cColorBits is bits per pixel, and cDepthBits is for the Z buffer.... Can anyone confirm, and what value should I use for the Z buffer ? 24 ?

Share this post

Link to post
Share on other sites
I got yer PFD swingin...

: )

From MSDN:

Specifies the depth of the depth (z-axis) buffer.

Specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer.

Share this post

Link to post
Share on other sites
Normally what you do is ask for the pixel format you''d like (e.g. 32bit colour and 32bit z buffer) and ChoosePixelFormat will pick the one it thinks is closest.

You''ll find that often the z buffer depth will be made to be 16bit if the colour depth is 16bit, and the z buffer made to 24 if the colour depth is 32bit (for cards that have 24+8bit depth+stencil buffers).

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

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!