Nehe OpenGL Tutorial OpenGL window ported to vs2013 Win7 environment

Source: Internet
Author: User

1. Configure the OpenGL environment to download glut (OpenGL utility Toolkit) https://www.opengl.org/resources/libraries/glut/to Local. After decompression there are two Lib files, two DLL files and one. h file.

2. Glut.lib and Glut32.lib are copied to X:\Program Files (x86) \microsoft Visual Studio 12.0\vc\lib.

3. Glut.dll and Glut32.dll copied to the C:\Windows\system32 folder (32-bit system) or? C:\WINDOWS\SYSWOW64 (64-bit system) (two directories are copied)

4.. h files are copied to X:\Program files (x86) \microsoft Visual Studio 12.0\VC\INCLUDE\GL If you do not have a GL folder under the Incluce directory, you will need to manually create




This will set the OpenGL environment in place.


1. Create a new Win32 project, preferably not empty.

2. Follow the tutorial code, the address is: http://www.yakergong.net/nehe/content no longer repeat.

3. In vs2013, the string type cannot be converted error, that is, the encoding format error problem, string constants directly _t () macro can be resolved, if it is a variable, you need to do a conversion in the following way.

char* title = "AAAA";

WCHAR wsztitlename[256];
memset (wsztitlename, 0, sizeof (wsztitlename));
int L = MultiByteToWideChar (CP_ACP, 0, title, Lstrlena (title), Wsztitlename, sizeof (wsztitlename)/sizeof (wsztitlename[ 0]));


Then you can use Wsztitlename.

The above method is derived from http://blog.csdn.net/rodgeliao/article/details/7091926


After the above steps, the Nehe code can be run on the vs2013

Works for: http://download.csdn.net/detail/mizoushenjing/8723589

Nehe OpenGL Tutorial OpenGL window ported to vs2013 Win7 environment

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.