OpenGL Tutorial by NeHe

时间:2012-01-14 07:36:02
【文件属性】:
文件名称:OpenGL Tutorial by NeHe
文件大小:659KB
文件格式:PDF
更新时间:2012-01-14 07:36:02
OpenGL Tutorial NeHe 入门 指南 Welcome to my OpenGL tutorials. I am an average guy with a passion for OpenGL! The first time I heard about OpenGL was back when 3Dfx released their Hardware accelerated OpenGL driver for the Voodoo 1 card. Immediately I knew OpenGL was something I had to learn. Unfortunately, it was very hard to find any information about OpenGL in books or on the net. I spent hours trying to make code work and even more time begging people for help in email and on IRC. I found that those people that understood OpenGL considered themselves elite, and had no interest in sharing their knowledge. VERY frustrating! I created this web site so that people interested in learning OpenGL would have a place to come if they needed help. In each of my tutorials I try to explain, in as much detail as humanly possible, what each line of code is doing. I try to keep my code simple (no MFC code to learn)! An absolute newbie to both Visual C++ and OpenGL should be able to go through the code, and have a pretty good idea of what’s going on. My site is just one of many sites offering OpenGL tutorials. If you’re a hardcore OpenGL programmer, my site may be too simplistic, but if you’re just starting out, I feel my site has a lot to offer! This tutorial was completely rewritten January 2000. This tutorial will teach you how to set up an OpenGL window. The window can be windowed or fullscreen, any size you want, any resolution you want, and any color depth you want. The code is very flexible and can be used for all your OpenGL projects. All my tutorials will be based on this code! I wrote the code to be flexible, and powerful at the same time. All errors are reported. There should be no memory leaks, and the code is easy to read and easy to modify. Thanks to Fredric Echols for his modifications to the code! I’ll start this tutorial by jumping right into the code. The first thing you will have to do is build a project in Visual C++. If you don’t know how to do that, you should not be learning OpenGL, you should be learning Visual C++. The downloadable code is Visual C++ 6.0 code. Some versions of VC++ require that bool is changed to BOOL, true is changed to TRUE, and false is changed to FALSE. By making the changes mentioned, I have been able to compile the code on Visual C++ 4.0 and 5.0 with no other problems. After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under „Object/Library Modules” at the beginning of the line (before kernel32.lib) add OpenGL32.lib Glu32.lib and Glaux.lib. Once you’ve done this click on OK. You’re now ready to write an OpenGL Windows program.

网友评论

  • 很不错,希望能get 到 东西
  • 不错 英文的 挺好的
  • 喜欢英文版的。很好。
  • 正在学习opengl,这个教程很不错,英文的也能看懂,谢谢楼主分享
  • 看东西还是要看原版,作为一个程序开发者,看英文还是必要的
  • 作为英文文献不错。
  • 很好很详细的,按照教程一个一个例子过,能学会基础。
  • 很不错的opengl教程,英文版,用vc写的,才看了一点,讲的很详细
  • 英文的,幸好找到中文的了。谢谢
  • 很好 英文的 考驗英文水平啊