Porting X Window System Applications

Like Windows NT and Windows 95, the X Window System is an event-handling, message-based system that uses window controls and menus. The OpenGL code in your X Window System application is probably located in areas that roughly correspond to where it will appear when you port it to Windows NT and Windows 95. Most of your OpenGL code will not change, but you must rewrite any code that is specific to the X Window System. For more information on Win32® application programming interface User and GDI calls, see the Microsoft Platform SDK. For more information on the X Window System and UNIX, refer to your X Window System and UNIX operating system documentation.

    Use the following general procedure to port your X Window System OpenGL programs to Windows NT and Windows 95
  1. Rewrite the X Window System specific code using equivalent Win32 code. Locate window-creation and event-handling code. The X Window System, Windows NT, and Windows 95 are event-handling, message-based windowing systems, which makes it easier to determine where to make the appropriate changes. (However, especially for large applications, rewriting an application from one operating system to another can be a complex and difficult undertaking.)
  2. Locate any code that uses GLX functions. These are the functions you'll translate to their equivalent Win32 functions.
  3. Translate GLX pixel format functions and Visual/Drawable functions to appropriate Win32/OpenGL pixel format and device context functions.
  4. Translate GLX rendering context functions to Win32/OpenGL rendering context functions.
  5. Translate GLX Pixmap functions to equivalent Win32 functions.
  6. Translate GLX framebuffer and other GLX functions to the appropriate Win32 functions.