Getting Started with OpenGL

Source: Internet
Author: User

Start by documenting some of the more good sites:

Nehe's OpenGL Chinese tutorial
http://www.yakergong.net/nehe/

OpenGL Primer Learning-doing5552-c++ Blog
Http://www.cppblog.com/doing5552/archive/2009/01/08/71532.html

opengl-tutorial.org | Tutorials for modern OpenGL (3.3+)
http://www.opengl-tutorial.org/

Chinese:

opengl-tutorial.org | Tutorials for modern OpenGL (3.3+)
http://www.opengl-tutorial.org/zh-hans/

****************************************************

Opengl-the industry standard for high performance Graphics
https://www.opengl.org

OpenGL-Sogou Encyclopedia
Http://baike.sogou.com/v75048.htm

Fatal error C1083:cannot open include file: ' gl/glew.h ': No such file or directory

Original address:

Fatal error C1083:cannot open include file: ' gl\glext.h ': No such file or directory-Zheng Haibo CSDN Blog-Blog Channel-csdn.net
http://blog.csdn.net/nupt123456789/article/details/7171441

Workaround:

When debugging some OpenGL programs, you will be prompted fatal error C1083:cannot open include file: ' gl\glext.h ': No such file or directory error;

I downloaded a glext.h file from the Internet and saved it in the. \microsoft The Visual Studio\vc98\include\gl folder, recompile it again;

I thought this should be no problem, but still prompt the above error, and finally solve it in the following ways:

1. Copy the Glext.h file to the current project directory:

2. The line that will prompt for errors include "Gl\glext.h", instead: #include "glext.h";

3. Delete all files under the Debug folder, (or do not delete, click on ' Rebuild Solution ' directly)

4. Re-editing can be;

The cause of the problem:

In general, fatal error C1083:cannot open include file: ' gl\glext.h ': No such file or directory error, obviously

header file not found; In general, put the header file in the Include folder under VC98, you can solve the problem, I installed the computer vc++6.0, also installed VS2005;

Therefore, it is possible that the VS2005 contains files that are not the same path as the vc++6.0 contains files;

As I expected, vc++6.0 and VS2005 GL folder is independent, the first time to modify the vc++6.0 software;

My VS2005,GL path is: D:\VISUALSTUDIO2005\VC\PLATFORMSDK\INCLUDE\GL

Therefore, copy the glext.h to one of them.

Preparation before learning OpenGL

The first step is to select a compilation environment

Now the main Windows System compiler environment has visual Studio,broland C + + builder,dev-c++, and so on, they all support OpenGL. But here we choose Visual Studio 2005 as the environment for learning OpenGL.

Step two, install the Glut toolkit

Glut is not necessary for OpenGL, but it will give us a certain convenience in learning, recommended installation.

Glut in the Windows environment: (approximately 150k in size)

Http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip

If you cannot download from the above address, please use the following connection:

Http://upload.programfan.com/upfile/200607311626279.zip

Steps to install glut in a Windows environment:

1, will download the compressed package to untie, will get 5 files

2. Search for "gl.h" in "My Computer" and locate the folder where it is located (VC6.0 in D:\Program Files (x86) \microsoft Visual Studio\vc98\include\gl Folder

If it is VisualStudio2005, it should be the "Vc\platformsdk\include\gl folder" under its installation directory). Put the extracted glut.h into this folder.

3. Put the extracted glut.lib and glut32.lib into the folder where the static function library is located (VC6.0 in D:\Program Files (x86) \microsoft Visual Studio\vc98\lib Folder

If it is VisualStudio2005, it should be the "Vc\lib" folder under its installation directory).

4. Put the extracted glut.dll and Glut32.dll in the System32 folder under the operating system directory. (Typical position: C:\Windows\System32)

Step three, build an OpenGL project

Here take VisualStudio2005 as an example.

Select File->new->project, then select Win32 Console Application, select a name, then press OK.

On the left side of the dialog box, click Application Settings, find the empty project and tick on it and select Finish.

Then add a code file to the project named "OPENGL.C" and pay attention to using. C as the end of the file.

Done, it is no different from the usual project.

Getting Started with OpenGL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.