GLPRT: Sample App Demonstrates Printing in OpenGL

Last reviewed: June 6, 1996
Article ID: Q149769
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK), for Windows, version 4.0 (beta)

SUMMARY

Prior to Microsoft Windows NT version 4.0, OpenGL applications that needed to print a rendered scene had to render their scene onto a DIB Section and then print that DIB Section. With Windows NT 4.0, OpenGL applications can now render directly to a printer DC provided the printer is backed by a metafile spooler.

The GLPrint sample included in GLPRT.EXE shows how to set up a printer DC, pixel format descriptor, and viewport in order to render an OpenGL scene to a printer.

You can find GLPRT.EXE (size: 63042 bytes) 
                      , a self-extracting file, on these services:

  • Microsoft's World Wide Web site on the Internet

          On the www.microsoft.com home page, click the Support icon
          Click Knowledge Base, and select the product
    
          Enter kbfile GLPRT.EXE (size: 63042 bytes) 
                                , and click GO!
          Open the article, and click the button to download the file
    
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the Softlib/Mslfiles folder
          Get GLPRT.EXE (size: 63042 bytes) 
    
  • The Microsoft Network

          On the Edit menu, click Go To, and then click Other Location
          Type "mssupport" (without the quotation marks)
          Double-click the MS Software Library icon
          Find the appropriate product area
          Locate and download GLPRT.EXE
    
  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download GLPRT.EXE (size: 63042 bytes) 
    

    For additional information about downloading, please see the following article in the Microsoft Knowledge Base:

       ARTICLE-ID: Q119591
       TITLE     : How to Obtain Microsoft Support Files from Online Services
    
    

    MORE INFORMATION

    The GLPrint sample renders a lit-cube to the window. From the File menu, choose Print, and a dialog box appears. When you choose a printer, the scene prints provided that the all of the following conditions are met:

    • The print spooler is located on a Windows NT 4.0 (or higher) machine.
    • The printer is backed by a metafile spooler.
    • EMF spooling is turned on for the printer. Some printers, such as PostScript printers, have EMF spooling turned off by default.

    OpenGL graphics are printed in bands in order to conserve memory. Note that this can significantly increase the time it takes to print your scene.


  • Additional reference words: 4.00 glprint.exe
    KBCategory: kbgraphic kbfile kbhowto kbcode
    KBSubcategory: GdiOpenGL



    THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

    Last reviewed: June 6, 1996
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.