A1 OpenGLInstallation
A1 OpenGLInstallation
A1 OpenGLInstallation
NOTE: You might find it helpful to do a web search on Visual C++ and freeglut
to find step by step instructions for a particular version of VC++. Each
version of VC++ seems to move around some standard files and change the
menus.
GLEW: http://glew.sourceforge.net/
freeglut: http://www.transmissionzero.co.uk/software/freeglut-devel/
Use Xcode to build your OpenGL projects. The current version is 5.1.1
To make a new OpenGL project do the following:
1. Create a new project
a. FileNewProject
b. Choose OS XApplicationCommand Line Tool
2. Delete the default main.cpp file and drag the files you want into the
project
3. Link OpenGL and GLUT with your project
a. Click on your project (on the left) and then select the Built
Phases tab in the middle area
b. Under Link Binary With Libraries click the “+” button and select
OpenGL and GLUT frameworks
i. NOTE: OSX now considers most of the GLUT functions
depreciated. For the purpose of having cross-platform code
we’ll keep using GLUT on OSX.
4. Observe where your builds will go
a. By default the will go to some weird location. Go to Preferences
then choose the Location Tab. The Derived Data area says where
your build will go
i. Consider changing this to Relative
5. Build your project
a. Make sure you place your shader files in the same directory as
the binary that is built.
OpenGL Installation: Linux
Since each flavor is Linux is a bit different your best bet is to search for
solutions that will work best for your system. However below are few links
to get you started:
http://www.cs.unm.edu/~angel/BOOK/INTERACTIVE_COMPUTER_GRAPHICS/SIXTH_EDITION/linux
https://github.com/lkarydas/objview
I have also provided a makefile to get you started. This makefile expects a
particular file structure, in particular that the necessary include files
(mat.h, Angel.h, vec.h, etc..) are in ../include and that the InitShader
code is in ../common/
In addition, since there are so many different flavors of Linux, if you want
to develop on your own Linux machine, you must make sure that it compiles and
runs on tux. Tux already has all the necessary libraries installed, you just
need to enable X11 forwarding to be able to see the graphics.
NOTE: The graphics cards on the tux cluster requires shader version 130 (as
opposed to 150 provided). To get this to work all you need to do is change
#version 150 to #version 130 in each of the *.glsl files.