NeHe课前配置

最近有需要用opengl来实现虚拟环境,所以找了NeHe的教程来学习。
原学习网址为:http://nehe.gamedev.net/tutorial/creating_an_opengl_window_win32/13001/
有中文的翻译地址为http://blog.51cto.com/zt/186/1
或者是http://blog.csdn.net/ygc87/article/details/6734266?locationNum=4

由于作者当时是用VC开发的,而现在我们大多都用的是VS,所以需要稍作配置。我电脑的配置是win10+vs2013,配置的时候主要步骤如下:
1、按照作者所说的打开vs,新建一个空的win32工程,切记不是控制台工程。

2、把lesson1的源代码都复制过来,会报很多错误。主要是下面这种错误
这里写图片描述
这里其实只要更改一下设置就好,选择项目-》属性
这里写图片描述
改完这里就好了。

3、按照作者说的加上3个链接,分别是glaux.lib,opengl32.lib,glu32.lib。如图这里写图片描述
加上之后生成一下会发现出现很多链接失败以及找不到glaux.h和glaux.lib之类的错误。这是因为我们的电脑里还缺少一些相应的文件。

4、在网上下载opengl的一系列库文件,有积分就在CSDN里面下吧,没有的话https://zhidao.baidu.com/share/e69cd0f335121b7ae044cb8c611c64aa.html
百度上也有就是感觉旧了点。

5、将文件中.dll结尾的文件放到C:\Windows\SysWOW64(电脑为64位)
32位的还是放在C:\Windows\System32这里。
.h结尾的就放在vs安装目录里面的include文件夹里面的gl文件夹中,没有的可以新建一个。
.lib结尾的就放在vs安装目录里面的lib文件夹中。
切记:如果提示文件已存在,那说明你的电脑自带了一些库文件,这个时候就不要覆盖了,毕竟自带的还是比较靠谱一点。

6、这个时候重新生成一下,就没有错误了。运行程序这个时候就会得到正确的结果。配置到此就没有问题了。但其实我后来试了一下其实如果下面这句话注释掉

#include <gl\glaux.h>// Header File For The Glaux Library

然后不要把glaux.lib加入附加依赖项中,最后不用下载配置所有的库文件也能成功实现出正确结果的,貌似是因为目前还用不到glaux这个库,而我的电脑里本身也带有一些库文件,所以可以这样子。后面可能还是要配置,所以还是就这样吧。后面继续写写在nehe教程中的一些收获,希望大家支持。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
NeHe SDK v1.10 This is a small Software Development Kit which covers a number of the tutorials written by Jeff Molofee(NeHe) into a fairly unified framework that should allow the construction of simple graphical games. There are nine example executables(in the bin directory) showing off the capabilities of the SDK. They are: Example 1: A simple rotating box and pyramid Example 2: Text using OpenGL routines Example 3: 3d Text using OpenGL routines Example 4: Rotating box and pyramid showing frame counter Example 5: Particle engine and billboard demonstration Example 6: Rotating cube using multitexturing Example 7: MD2 animation and milkshape object rendering demo Example 8: Video texturing Example 9: Built in shapes and display list demonstration Example 10: Simple fog demonstration Example 11: Environment mapping demonstration Example 12: Scissor test and 2d demos Required specification: IBM compatible PC Pentium 300 (although it may work with less) with 64MB RAM OpenGL compatible graphics card with latest drivers. Note: Some older cards, such as Voodoos and the early ATIs do not have drivers which appear to be completely compatible. Use these at your own risk. Any card problems reported are in bugs.txt Microsoft Visual Studio 6 for recompilation and development, although there should be no reason why it couldn't be compiled on Borland with a few changes. MinGW gcc however has no support for IPicture at the time of writing, so porting it might be a little more complex. License: If you use this software you agree to be bound by the licence in the license.txt file. Known Bugs: See bugs.txt Acknowledgments: See thanks.txt Development with this SDK: The simplest way to get to grips with this SDK is to read through the example files, then throught the library header files.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值