Today in the configuration of OpenGL encountered some problems, after a variety of "play" finally configured. Jersey
Computer for WINDOWS10 (X64), originally installed vs2015, so only need to download some header files. OpenGL has some reusable libraries, such as Glut,glew, which need to be installed on the Windows platform, because Microsoft is only supporting OpenGL version 1.1 in order to promote its own DX.
Now that OpenGL has grown to 3.0, we need to download and configure these libraries ourselves, where we install glut, glee, Glew, and some OpenGL extension support.
GLUT: Provides the encapsulation of the window, which is a cross-platform window, we do not have to write the cumbersome window code.
Glee: Convenient to determine whether the current system is supporting an OpenGL feature, we do not have to write the cumbersome first take the function address and then judge the code.
Glew: Because Windows only supports OpenGL 1.1 by default, if you want to use a later version of OpenGL, you need to install it to automatically identify all of the OpenGL advanced extension functions supported by your platform.
First, give a link to the official: https://www.opengl.org/wiki/Getting_Started
But the official only give the computer to configure the graphics driver. The three libraries had to be clothed in their own.
1.glut
Glut3.7:http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Copy the Glut.dll Glut32.dll to C:\Windows\SysWOW64. Copy the Glut32.lib and Glut.lib to Vs2015\vc\lib. Copy the glut.h to C:\Program Files (x86) \ Windows KITS\8.1\INCLUDE\UM\GL.
When you write a program, you only need to
#include <GL/gl.h>
#include <GL/glu.h>
Use
#include <GL/glut.h>
Replace it. Because these header files are already included in the header file Glut.h, and the necessary libraries are imported:
#pragma comment (lib, "Winmm.lib")/* link with Windows multimedia lib */
#pragma comment (lib, "Opengl32.lib")/* link with Microsoft OpenGL lib */
#pragma comment (lib, "Glu32.lib")/* link with OpenGL Utility lib */
#pragma comment (lib, "Glut32.lib")/* link with Win32 GLUT lib */
2.glew
: Https://sourceforge.net/projects/glew/?source=directory
As above, the three-format files are still copied to their respective directories. In the program we just need to include the glew.h before including the glut.h (note: Be sure to include glew.h first).
Add the following sentence to the code:
#pragma comment (lib, "Glew32.lib")
Example:
#include <GL/glew.h>
#include <GL/glut.h>
#progrma comment (lib, "Glew32.lib")
After creating the OpenGL rendering context, call Glewinit (); Initialize the Glew to the right.
3.glext.h glxext.h glcorearb.h wglext.h
Glext.h:https://www.opengl.org/registry/api/gl/glext.h
Glxext.h:https://www.opengl.org/registry/api/gl/glxext.h
Glcorearb.h:https://www.opengl.org/registry/api/gl/glcorearb.h
Wglext.h:https://www.opengl.org/registry/api/gl/wglext.h
Or the same as above, placed in the corresponding directory.
4.glaux
: http://download.csdn.net/detail/li235456789/8224459
When put glaux.h in the specified folder, run an error saying is, can't open glaux.h. Can be added on item----(ProjectName) Properties---Configure properties-------add dependencies to the linker--
However, when you run the program, the following error occurs:
"Draw.exe" (Win32): "C:\Users\YC\Documents\Visual Studio 2013\projects\draw\debug\draw.exe" has been loaded. The symbol is loaded.
"Draw.exe" (Win32): "C:\Windows\System32\ntdll.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\kernel32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\KernelBase.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\mfc120d.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\advapi32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\msvcrt.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\sechost.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\rpcrt4.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\msvcr120d.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\user32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\gdi32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\lpk.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\usp10.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\ole32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\oleaut32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\shlwapi.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\imm32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\msctf.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\uxtheme.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (WIN32): Loaded "C:\Windows\winsx\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_ None_ec80f00e8593ece5\comctl32.dll ". Unable to find or open PDB file.
"Draw.exe" (WIN32): Loaded "C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18455_none_ 72d576ad8665e853\gdiplus.dll ". Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\apphelp.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (WIN32): uninstalled "C:\Windows\System32\apphelp.dll"
"Draw.exe" (Win32): "C:\Windows\System32\cryptbase.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\dwmapi.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Users\YC\AppData\Roaming\TaobaoProtect\TaobaoProtectSE.dll" is loaded. The module has been generated and does not contain symbols.
"Draw.exe" (Win32): "C:\Windows\System32\psapi.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\shell32.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\version.dll" is loaded. Unable to find or open PDB file.
"Draw.exe" (Win32): "C:\Windows\System32\profapi.dll" is loaded. Unable to find or open PDB file.
The program "[5036] Draw.exe" has exited with a return value of 0 (0x0).
WORKAROUND: Debug---------Check the boot source server support----and tick the Microsoft symbol server
Reference, http://www.cnblogs.com/lzihua/archive/2012/05/11/2495714.html and http://blog.csdn.net/tahelin/article/details/30318341.
Some problems when configuring OpenGL