The OpenGL Resource Page
|
|
Compiling Instructions
-
For Linux -
- The command line is
gcc foobar.c -lglut -lGLU -lGL -o foobar
- Sometimes it may require the -lX11 -lXi and -lXmu libraries which will require you to add -L/usr/X11R6/lib to the command line too in addtion to the libraries.
-
For Windows -
- Add the GL libraries to your linker path.
- Make sure you have the GL DLL's in your system directory.
- Build your project and it should work alright.
Checkout the Makefile in colorcube.tgz for further clarifications.
Some Tips
- OpenGL was meant to be platform independent - try to keep your code that way !!!
- Try and use GLUT wherever possible - it makes your code more portable.
- If you want to program specifically for X or for Windows - use GLX for X and WGL for Windows - GLUT does this for you so you are anyway better off sticking to what I said earlier.
- If you want to get fancy about userinput devices, networked stuff and sound explore the host of opensource libraries which are available to do the stuff. A very good thing to use here is SDL (Simple Directmedia Layer) - it is also supposed to be platform independent.
- Don't be disheartened if you happen to see a totally black window (nothing drawn) first time you run your GL code - it happens to everyone !!
Demos
- ColorCube - A simple colored cube viewer
- Atlantis - The atlantis screensaver from linux (the one with the dolphins). A classic glut demo by Mark J Kilgard.
Notes
- The OpenGL Viewing Pipeline [ps] [pdf]
Links
- Opengl Official Site
- NeHe Productions (OpenGL) - Very useful OGL tutorials
- The
OpenGL Red Book - The OpenGL programming guide
- The OpenGL FAQ and Troubleshooting Guide
- SDL Official Site
A Request To All Users
The various demos on this page are from various sources. Generally the source code of each program
has the some information about its origin . If you use any of these source codes for your purposes do
acknowledge the original source.
OpenGl is a registered trademark of SGI.
Page last updated on 09 February, 2004.
|
AT cse.iitd.ac.in
|
© Parag Chaudhuri , 2009
|
|