Notes for Homework 8
- IMPORTANT NOTE: Depending on the ability of your home computer, you may
not be able to complete this assignment from home!
- IMPORTANT NOTE: The Linux machines in room 301 MLH will work for this
assignment, however you will not be able to use these machines remotely!
- Two programs I have written will be required for this assignment. You only need the executable, but the source is also provided:
- Please read the "README" file! It answers a number of common problems.
- Shader Template for Problem #1:
- Shader Template for Problem #2:
- The executable comes with all the necessary libraries, and should run out of the box (if not, see the README)!
- (Optional) To compile this program from source files, you need to install GLEW.
- Download it from SourceForge.
- Under Windows, follow the instructions for installing GLUT, only with GLEW's .dll's, .lib's, and
.h's
- Under Linux, you may need to compile the source (see GLEW's README)
- If you have root access on your machine, install the libraries (.a and .so files) in /usr/lib/
and the headers in /usr/include/GL/ (or another of your favorite locations that the compiler knows about).
- If you do not have root access on your machine, put the headers and libraries in the same directory as
the source code, change references in the code from < GL/glew.h > to "glew.h", and link with libGLEW.a instead of -lGLEW.
- Information about GLSL shaders can be found in Chapter 15 and Appendix I of the RedBook.
- Please note, copies older than the 5th edition do not have discussion of GLSL.
- Also note, 5th edition copies of the RedBook have many typos during the discussion of GLSL.
If the program complains about not having OpenGL 2.0 support, this message can mean one of three things:
- You're running this program on a machine that does not
support OpenGL 2.0. Goto MLH 301!
You
CANNOT run this on a machine in 301 MLH and display it
elsewhere. Seriously... Really... Believe me!
- You've got conflicting GLEW libraries.
This means earlier you installed GLEW, so you have multiple versions
in your path. Make sure to use the one I include (it is the latest version).
- The driver in 301 MLH is falling back to software rendering.
This can occur if you have been logging into a Linux machine remotly to run
your programs and HAVE NOT CLOSED your remote session. Since running
OpenGL programs over the network automatically reverts to the software
rendering pipeline (which does not support OpenGL 2.0), the settings may not
be reset until you log out of all DIVMS machines and remote sessions and then
physically relogin at a terminal in 301.
If you absolutely cannot get the shader program working, please follow the following steps before
sending an e-mail to myself or the TA:
- If you are not in MLH 301, stop. Goto to the lab and try there.
- Run the "checkCompatibility" script I include with the Linux executable.
- If the results of the script says "OpenGL 1.2 (1.4 Mesa 5.4)" (or something similar),
please reread the README If the results read "OpenGL 2.1 (97.75 nVidia)" or something similar and you cannot get
the program working, please send us as much information as possible about the machine.
(the complete output of "glewinfo" would be helpful -- edit the "checkCompatibility"
script to remove the "| grep OpenGL" part).
Last Modified: Tuesday, November 13, 2007
Chris Wyman (cwyman@cs.uiowa.edu)