Tag Archives: VS2015+OPENGL

Construction of vs2015 OpenGL configuration environment

OpenGL configuration
Main solutions:
What is OpenGL?How to configure successfully to create a window?
1. OpenGL is what?
A set of specifications that defines a set of functions, what arguments are passed in, and what results are sent out. Since it is only such a set of specifications, anyone can implement functions in different ways as long as they conform to the specifications. VS with OpenGL library (should be able to directly use VS own, but here is the configuration of their own this way, after your add)
OpenGL itself is a big state machine: there are many variables can be set up so that we can control its operations. The state of OpenGL is often referred to as a context. So what we do with OpenGL is we change the context in which it runs by changing its state, so that OpenGL gives us the results that we want
2. The configuration
2.1 What tools need to be prepared for configuration?

2.VS2015
. Glad source is used to encapsulate the function called in OpenGL library
4>make is used to compile source code (GLFW library).
2.1.1 download GLFW
Website address is: http://www.glfw.org/download.html (you need over the wall to access)
in baidu network location to download, links:

https://pan.baidu.com/s/1ceyucgFRYImnjmG-LmkuwA password: 9 SMQ
2.1.2 download Cmake
Through CMake GLFW source is needed to compile the
website address is: https://cmake.org/download/ (also need over the wall to access)
baidu network location to download
link: http://pan.baidu.com/s/1clPRIm password: ct24
install CMake, the following configuration, click the configure, choose vs2015 (vs) according to oneself, click the generate, later. At this point, look at the cmake file under the generated GLFW project.
## 2.1.3





Click the Generate button at the bottom right corner of the page, and on the following page, click Glad. Zip to press

2.1.4 The download is done, the next to assemble the library used

1
1
1
1
1
1 New folder Opengl
2. Will GLFW directory of the include directory is copied to the Opengl directory to
3. Opengl folder under a new folder, named lib
4. Will be compiled GLFW library is copied to the lib folder
GLFW library position is: GLFW – 3.2.1 \ SRC, the inside of the Debug and Release two directory replication, copied to the lib folder
note: Debug and Release do not exist at the beginning of this time, you need to open the GLFW solution in VS2015, run the two modes (Debug/Release), to produce, run after the Win32 folder will have these two folders, do not bother, just copy the two SRC. A lot of readers didn’t know what I was looking at on the blog, so let me make a statement here.
5. Copy glad decompression folder, the include directory two folders glad and KHR copy, copy to the OpenGL directory, include folder

Include
lib
ah
2.1.5 OK, finally can use VS2015 to create projects, add libraries
1.VS2015, create an empty project,
copy from glad folder to project source file.
click on the project, set the properties, VC ++ directory, set respectively


br> *>lick on the connector, enter, and add additional dependencies
** Note: !!!!!!!!!!!