PDA

View Full Version : get available pixelformats?!!



doodlemunch
06-15-2005, 01:00 AM
how to check what pixelformats are supported in hardware so I can use the best??

Ehsan Kamrani
06-15-2005, 03:25 AM
ChoosePixelFormat() selects the best format for you. You don't need to know anything about the pixel formats. only call this function and it selects the best format ;)
-Ehsan-

Relic
06-15-2005, 05:19 AM
ChoosePixelFormat is sufficient for most cases, but it is really not perfect.
It has bugs, ignores some flags, and doesn't match the format nearest to your request in some cases.
For better matching you can enumerate all available formats manually with DescribePixelFormat and select the one which matches your requirements best.
To check which are accelerated by hardware, you need to evaluate the dwFlags field and look for the "accelerated" bits.
For special formats you need to use this extension
http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_pixel_format.txt
which matches formats more exactly than Microsoft's ChoosePixelFormat.

UrbanLegend
06-15-2005, 05:23 AM
http://www.3drealtimesimulation.com/3dsceneBB/viewtopic.php?t=69