Microsoft KB Archive/176752

{|
 * width="100%"|

Glen.exe Shows How to Enumerate Pixel Formats in OpenGL

 * }

Q176752

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows NT Server versions 3.51, 4.0
 * Microsoft Windows NT Workstation versions 3.51, 4.0
 * Microsoft Windows 95
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional

-

SUMMARY
The GLEnum sample provides a demonstration of how to enumerate pixel formats and method for checking the available pixel formats provided on your machine. The GLEnum sample is included in Glen.exe.

The following file is available for download from the Microsoft Download Center:

"Glen.exe" For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

MORE INFORMATION
GLEnum allows you check the capabilities of the available pixel formats available on your system quickly and easily. There are many generic pixel formats that are always available, but there may be additional ones if your video adapter provides 3D acceleration. You should use these accelerated formats whenever they are available.

When you simply specify a pixel format descriptor and send it to the ChoosePixelFormat and SetPixelFormat functions, allows a generic mapper to determine what pixel format to use. You can gain total control over this selection process by doing your own enumeration, as demonstrated in GLEnum. One method to do this is to associate a relative weight to each attribute you are interested in, enumerate all the available formats, and then choose the pixel-format descriptor with the highest weight.

GLEnum demonstrates how to enumerate pixel formats and shows you the contents of each pixel format. When you enumerate pixel formats for your OpenGL applications, you choose one of the enumerated pixel formats for your application to use. The choice you make is totally dependent on what attributes your OpenGL program needs.

Additional query words: opengl pfd descriptor acceleration

Keywords : kbfile kbsample kbOSWinNT351 kbOSWinNT400 kbOSWin2000 kbSDKWin32 kbOSWin95

Issue type : kbinfo

Technology : kbAudDeveloper kbWin32sSearch kbWin32API