GLDib Demonstrates Rendering to DIBSections By Using OpenGL (272221)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • the operating system: Microsoft Windows XP 64-Bit Edition

This article was previously published under Q272221

SUMMARY

The GLDib sample, which is contained in the self-extracting executable, Gldib1.exe, demonstrates how to render an OpenGL scene into a DIBSection (a device-independent bitmap). The sample also demonstrates how to display and print the DIBSection, thus effectively rendering OpenGL to the printer.

The sample creates a DIBSection that is in the same format as the screen, which avoids the need for system-translation of the DIB at display time. This can yield relatively fast animation for unaccelerated systems.

The frames-per-second (FPS) animation rate is displayed in the title bar of the window. You can reset this calculation (after resizing the window for instance) by pressing the "R" (or "r") key on your keyboard.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: Sep-22-2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

REFERENCES

Most of the following references can be found on the Microsoft Developer Network (MSDN) Library CD-ROMs. Some of these references are published by publishers independent of Microsoft; we make no warranty, implied or otherwise, regarding the reliability of these resources.

  • For general information about OpenGL, please see the following resource:

    OpenGL 1.2 Programming Guide, Third Edition: The Official Guide to Learning OpenGL. Version 1.2. Mason Woo, et al.; Addison-Wesley Pub Co; ISBN: 0201604582. (This book is also known as the "red book.")

  • For more information about DIBS, see the following references:

    Gery, Ron. DIBs and Their Use. March 1992. (Development Library, Technical Articles).

    Gery, Ron. Using DIBs with Palettes. March 1992. (Development Library, Technical Articles).

  • For additional information about DIBs and DIBSections in general, click the article numbers below to view the articles in the Microsoft Knowledge Base:

    230492 HOWTO: Retrieving an Optimal DIB Format for a Device

    186221 SAMPLE: DibSectn.exe Uses DIBSections in Win32


Modification Type:MinorLast Reviewed:4/3/2006
Keywords:kbdownload kbDSWGDI2003Swept kbfile kbGDI KB272221 kbAudDeveloper