This sample demonstrates animation (rotation) of a color-shaded triangle using the Intel® Visual Fortran OpenGL module, IFOPNGL.MOD, an interface to the Windows implementation of OpenGL.

The sample also shows use of Windows message handling, including keypress recognition.

USAGE:

animateGL [-sb] [-ci] [-h]

-sb : Use single buffering (double buffer default)
-ci: Use indexed color palette (default is to use all colors)
-h : Display usage information.

While running, press the space bar to toggle animation on and off, press q to quit.

By using -sb, you can see the advantage of double-buffering as the single-buffered display is sometimes streaky.  -ci uses at most 256 colors rather than the full color depth.

For more information, see Advanced Graphics Using OpenGL in Using Intel Visual Fortran to Create and Build Windows-Based Applications.

System Requirements

Minimum requirements include a PC based on an IA-32 or Intel® 64 architecture processor supporting the Intel® Streaming SIMD Extensions 2 (Intel® SSE2) instructions (Intel® Pentium® 4 processor or later, or compatible non-Intel processor), and supported versions of the Microsoft Windows* operating system, Microsoft Visual Studio*, and the Intel® Visual Fortran compiler. Refer to the Intel® Parallel Studio XE product Release Notes for details on the complete system requirements.

Build Instructions

The sample is provided as a Microsoft Visual Studio* solution and also contains a command-line build script build.bat file. The build.bat file accepts an optional command-line argument from the following list: