Preparation for OpenGL programming

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
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值