To use OpenGL for programming, you should check the necessary head files and library files. You can find which files to be contained in the next precompiled-code:
#include
<GL/gl.h>
#include
<GL/glu.h>
#include
<GL/glaux.h>
#include
<GL/glut.h>
#pragma
comment(lib,"opengl32.lib")
#pragma
comment(lib,"glu32.lib")
#pragma
comment(lib,"glaux.lib")
#pragma
comment(lib,"glut32.lib")
In fact you can only use glaux or glut to create window and operate rendering.
The OpenGL Utility Toolkit(Glut) for Win32 is not available in advance. You should download the necessary files from http://www.xmission.com/~nate/glut.html. In this page the Documentation for the GLUT API is available in HTML, Postscript and PDF formats.
To build the glut dll in VC6.0:
First, open Microsoft Developer Studio. Then, select File -> Open Workspace and find the glut.dsw file in the file dialog and double-click on it. Finally, select Build -> Build glut32.dll.
When the build is finished, it will copy:
glut32.dll to %WinDir%/System,
glut32.lib glut.def to $(MSDevDir)/../../VC98/lib,
glut.h to $(MSDevDir)/../../VC98/include/GL/
Or you can copy the files manually.
To build the glut dll in VC7.0:
copy:
glut32.dll to %WinDir%/system32/,
glut32.lib glut.def to $(MSDevDir)/../..
/
Vc7/PlatformSDK/Lib
glut.h to $(MSDevDir)/../../
Vc7/PlatformSDK /include/GL
P.S.: Some other pages related to OpenGL:
http://cgm.cs.mcgill.ca/
The Computational Geometry Lab at McGill
本文介绍了使用OpenGL进行编程所需的关键文件及库文件,包括GL/gl.h、GL/glu.h等,并提供了在Visual Studio环境下构建OpenGL Utility Toolkit (GLUT) 的详细步骤。
1万+

被折叠的 条评论
为什么被折叠?



