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