Compaq Visual Fortran: A Guide to Creating Windows Applications

Chapter 15: Open GL Basics

15.1 Introduction

OpenGL was originally developed by Silicon Graphics, Inc., as a 3D graphics API to be used with Silicon's workstations, but today OpenGL is a cross-platform graphics standard under the control of the OpenGL Architecture Review Board (ARB). Members of the ARB, who represent leading hardware and software companies, meet regularly to review and revise OpenGL standards. OpenGL is a library of graphic functions that can be used to create applications with animated or interactive two- and three-dimensional graphics based on geometric primitives such as points, lines, and polygons. OpenGL provides the means for generating images that use wire frame displays, shading, shadows, and texture mapping. Every window in OpenGL uses a pixel format, and the attributes of each pixel include, among other things, RGB values, opacity values, and depth values so that pixels with a shallow depth overwrite deeper pixels. It is important to note that OpenGL functions should be used only with an OpenGL window. However, Graphics Device Interface (GDI) functions can be used with an OpenGL window once you have finished rendering the OpenGL scene.

The basic steps in creating OpenGL applications are as follows:

  • Specify the pixel format.

  • Specify how the pixels will be rendered on the video device.

  • Call OpenGL commands to construct objects and to define viewing volume, lighting, and colors.

The OpenGL library follows the C calling convention, and Visual Fortran provides a set of interface functions in DFOPNGL.MOD so that OpenGL functions are available within Fortran. Hence, Visual Fortran applications using...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: CCD Image Sensors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.