I am assuming that your PC is running windows XP, which should already have OpenGL support.Install GLUT 3.7 on your PC
1. Download glut library and source from Nat
Robin's web site:
(http://www.xmission.com/~nate/glut.html)
The zip file contains: glut32.dll, glut.h
3. Find where the OpenGL32.dll is installed on your computer. In my
computer (running
windows XP) , it is at:
C:\WINNT\SYSTEM324. Copy glut32.dll to the above directoriy
5. Find the vc lib path: Mine is at: F:\Program
Files\DevStudio\VC\lib
( I am assuming that you have Visual C++ 6.0 or .Net installed)
6. Copy glut32.lib to the above directory
7. Find the vc include path: Mine is at: F:\Program Files\DevStudio\VC\include\gl
8. Copy glut.h to the above directory
Use GLUT/OpenGL on CIS Unix Server
On CIS's Unix Server (StdSun etc), we have Mesa3d,
an OpenGL software
emulator, instaled that you can use. Since our unix server has no
graphics
hardware,
software implementation of OpenGL is the only choice. As you can
imagine,
a
Mesa3D program will be much slower than an OpenGL program that has
direct
access to graphics hardware.
To use Mesa3D/GLUT, you don't need to install anything. You just
need
to
make sure that you set the paths to Mesa3D and GLUT libraries
correctly.
Following is a sample Makefile that I used to compile a simple OpenGL
program
main.C.
The Mesa3D libraries can be found at:
/usr/class/graphics/Mesa-3.0/lib
The important libraries are:
libMesaGL.so (equivalent to libGL.a or
libGL.so
in an OpenGL environment)
libMesaGLU.so (equivalent to libGLU.a or libGLU.so
in an OpenGL environment)
libMesaGLw.a and libMesaGLwM.a - something to do
with Mesa with X interface
libglut.a: GLUT 3.7 library
Also, header files for include are also important. They are at:
/usr/class/graphics/Mesa-3.0/include/GL
Now here is the makefile:
**** Note: You can copy the Makefile from:
/usr/class/graphics/694g/lab0/Makefile
Cut and Paste the following Makefile code might cause errors if you
forgot to change the <space> before the following line:
$(CC) -o $@ $(CFLAGS) $@.o $(INCLUDES) $(LIBRARIES) \
to <tab>
#####################################################
MESA_DIR = /usr/class/graphics/Mesa-3.0
INCLUDES = -I$(MESA_DIR)/include \
-I$(MESA_DIR)/widgets-mesa/include
LIBRARIES = -L$(MESA_DIR)/lib
# compiler option
CC = g++ -g
CFLAGS =
EXECUTABLES = main
.C.o:
$(CC)
-c $(CFLAGS) $(INCLUDES) $<
all: $(EXECUTABLES)
$(EXECUTABLES): $(OBJ_FILES) $$@.o
$(CC)
-o $@ $(CFLAGS) $@.o $(INCLUDES) $(LIBRARIES) \
$(MESA_DIR)/lib/libMesaGLU.so
$(MESA_DIR)/lib/libglut.a \
$(MESA_DIR)/lib/libMesaGL.so
-lX11 -lXmu -lm
clean:
rm
-f $(EXECUTABLES) *.o core
#######################################################
To use OpenGL on your PC, you also have to install Mesa3D unless you have the specificUse OpenGL on your Linux PC
/usr/class/graphics/Linux_Mesa
You will see a couple of Mesa related rpm files in the directory:
Mesa-devel-3.1beta3-1.i386.rpm
Mesa-3.1beta3-1.i386.rpm
Use the rpm installer program on your linux system to install these
two packages. If they do not
work with your system - sorry. you will have to go to the web to look
for a version that is
compatible with your system setup. I intalled them on my Mandrake
6.1 Linux without
problems (okay I know Mandrake 6.1 is old, but I am happy with it so
far so become
lazy to upgrade).
You will also find two packages with their names starting with
lesstif.
"lesstif" is a
freeware version of X/Motif. You don't need to have these them unless
you are
interested in writing your own X/Motif programs.
For a Linux hacker, I would assume you want to try out everything
right?!
Okay, finally, you will need to install GLUT on your linux system -
read on. I will
tell you about it in the next section.
Download Glut 3.7 for Unix/Linux
The glut 3.7 for unix/linux used to be placed under a SGI web site
for their employee.
Unfortunately, this site was just recently being closed (what does
this imply ?....)
Anyway, you can download the glut 3.7 source from here
[3MB].
Last updated 9/22/2001 by Han-Wei
Shen