Thursday, February 12, 2009

Setting up visual c++ 6.0 for using OpenGL

1. The files opengl32.dll and glu32.dll should already be in the system folder. System folder path is "C:\WINDOWS\system32" in windows XP.

2. The files opengl32.lib and glu32.lib should already be in the "lib" folder of visual c++. The path for the "lib" folder is usually as follows: "C:\Program Files\Microsoft Visual Studio\VC98\Lib"

3. The files gl.h and glu.h should already be in a subfolder called "GL" under found under the "include" folder of visual c++.

4. OpenGL Utility Toolkit (GLUT) allows windowing, menus or input functionality. To use it, the files glut32.lib, glut32.dll and glut.h are required. These files are freely available and pointers to these files can be obtained from the website http://www.opengl.org. Place the file with dll extention in the system folder. The file with lib extension in the lib folder specified in step 2 above and the file with h extension in the GL folder specified in tep 3 above.

5. Once the files have been placed in their proper folders, open your project file in visual c++.

6. Under "Project" on menu bar, select the "Settings" option.

7. A dialog box should appear containing several tabs. Click on the "Link" tab and add the files Opengl32.lib, glu32.lib and glut32.lib.

8. Visual C++ is now set to build programs using OpenGL.

No comments:

Post a Comment