Build OpenGL Environment-windows/vs2013

Source: Internet
Author: User

For OpenGL environment, simple to set up in fact and OPENCV, you will see the following process and OpenCV similar, the difference is that some files need to find their own (because it is not integrated, each expansion needs to be downloaded separately)

1. First, for OpenGL header files, it is common to install VS, these files are self-brought:

Under the C:\Windows\System32, there are

Under C:\Program Files (x86) \ Windows KITS\8.1\INCLUDE\UM\GL

Under C:\Program Files (x86) \ Windows Kits\8.1\lib\winv6.3\um\x86

Therefore, if you find these, then the first step is completed, otherwise, you need to download these files yourself, if you do not have to contact me, QQ in the blog, or download here

Link: Http://pan.baidu.com/s/1eQpdMuA Password: Hmao

2. About GLUT:

I tried the freeglut,:http://freeglut.sourceforge.net/here.

Found it:

And then:

3. About Glew

Download Link: http://glew.sourceforge.net/

4. Configuration process

(1). Create OpenGL folder to save related files, see my (in the directory using the tree/f command can be displayed)

(2). Add Environment variables:

Note that you must join the DLL to path, or there will be an error that the dynamic link library cannot be found.

(3). Create a vs property sheet while creating a new test project

Name Any,

Must be an empty project.

How to create a new property sheet you can see my approach in OPENCV configuration.

The results are as follows:

Additional dependencies are as follows:

Freeglut.libglew32.libglew32mx.libglew32mxs.libglew32s.lib

OK, the configuration is complete, create a new file test: main.cpp

1#include <glut.h>2 #pragmaComment (linker, "/subsystem:\" windows\ "/entry:\" Maincrtstartup\ "")3 void Dis (void)4 {5 glclear (gl_color_buffer_bit);6GLRECTF (-0.5f, -0.5f,0.5f,0.5f);7 Glflush ();8 }9 Ten intMainintargcChar*argv[]) One { AGlutinit (&argc, argv); -Glutinitdisplaymode (Glut_rgb |glut_single); -Glutinitwindowposition ( -, -); theGlutinitwindowsize ( -, -); -Glutcreatewindow ("The first OpenGL"); -Glutdisplayfunc (&dis); - Glutmainloop (); +Return0; -}

Results:

Above.

Build OpenGL Environment-windows/vs2013

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.