CPEN 461/661, Spring 1997
OpenGL Tutorial

Contents

  1. Introduction
  2. A Simple Example, Hello_World.c (TJ version)
      Variations to add to this program:
    • Add multiple types of polygons of various sizes
    • Use a variety of colors for the polygons and the background color
  3. The Event Loop, events.c (TJ version)
  4. OpenGL Command Syntax
  5. OpenGL Primitives, primitives.c (TJ version)
  6. Changing the State, Points_Lines.c (TJ version)
  7. Drawing in 3 Dimensions, polygons.c (TJ version)
  8. Viewing and Modeling Transformations
  9. Viewport Transformation
  10. Perspective Projection
  11. Orthographic Projection
  12. Display Lists
  13. Animation
  14. Lighting
  1. Typical OpenGL Program Organization
  2. OpenGL Order of Operation
  3. tk Library Documentation
  4. OpenGL Man Pages

  1. Introduction
  2. OpenGL is a low-level graphics library specification. OpenGL makes available to the programmer a small set of geometric primitives - points, lines, polygons, images, and bitmaps. OpenGL provides a set of commands that allow the specification of geometric objects in two or three dimensions, using the provided primitives, together with commands that control how these objects are rendered into the frame buffer.

    The OpenGL API was designed for use with the C and C++ programming languages but there are also bindings for a number of other programming languages such as Java, Tcl, Ada, and FORTRAN.

    The OpenGL 1.1 Specification is maintained by Silicon Graphics and can be found at: http://www.sgi.com/Technology/openGL/glspec1.1/glspec.html.

    Mesa is a free implementation of the OpenGL specification. Mesa is the actual graphics library that will be used in this course. Additional information on Mesa can be found at: http://www.ssec.wisc.edu/~brianp/Mesa.html.

    The OpenGL specification is operating system and windowing system independent. It relies on the windowing system for window management, event handling, color map operations, etc . . .. In this course the tk library will be used for windowing system functions. (This library is not to be confused with Tk of Tcl/Tk.) The tk library provides the "glue" between OpenGL and X Windows. Documentation for the tk library can be found at http://www.eecs.tulane.edu:80/www/graphics/doc/tk-documentation. Source code for the tk library can be down-loaded from ftp://ftp.sgi.com/opengl/contrib/libtk.tar.Z.

    All examples in this tutorial were complied on the SunOS platform.