opengl : How to install it
'opengl' is a open source graphic library for showing something nice in your computer.
Of course you can use some of engines like Unreal Engine4 or Unity for showing graphics. But it is much better to learn opengl for student who want to study or want to get a scheme of graphics.
You can learn and understand 'lighting', 'shadowing', 'shading', '3D geometry', and a lot of other things deeper (but not easier) than just using engine.
This is the post for how to install opengl in visual studio.
The 'khronos' group offers some of files which can be used to build library for opengl in your computer environment. You can use those file by using 'cmake' software.
But there's already files builded for specific environment like '64bit visualstudio 2013'.
Here's link you can get files for setting opengl in visual studio
https://drive.google.com/file/d/1cMGeEtJSj3EsLywZV0dGABzYixL_9oR9/view?usp=sharing
After unzip files you can see tow folder, one is for glfw and another is for glew.
To install opengl you need both of it(glfw and glew).
Let's install opengl in visual studio now.
I will use visual studio 2015 but other version is similar.
First you should make your own project. if you don't know how make it, please see previous post 'C++ Visual studio_how to use'.
!!make sure your project environment is Release 64bit mode.!!
Second, please open folder of your project.

you can open folder as
1. select the project category like picture above.
2. click mouse right button
3. click 'open folder in file explorer'
Third, copy lib and dll files to folder you opened in second step.
Be careful you should copy right files to your project folder. For example if you use visual studio 2015 you should copy all of files in 'lib-vc2015' (glew32.dll, glew32.lib, glew32s.lib, glfw3.dll, glfw3.lib, glfw3dll.lib)
Fourth, copy GL and GLFW folders to folder you opened in second step.
GL and GLFW folders are located in include folder you downloaded(glew-2.1.0\include, glfw-3.2.1bin.WIN32\include)
Be careful you should copy folder not just file.
Last, please open properties window in visual studio application.

you can open properties window as
1. select the project category like picture above.
2. click mouse right button
3. click 'properties'
you can see properties window like below picture

1. go to Linker tab that is located in left side of property window
2. click the Input tab that is located in sub hierarchy in Linker tab
3. click the Additional Dependencies
4. click small arrow button right side of additional dependencies
5. click <Edit...>
6. do typing (glew32.lib; opengl32.lib; glfw3.lib)

7. select ok button both of Additional dependencies and property window.
now you finished installing opengl in your project
you can use opengl library by adding
#include "GL/glew.h"
#include "GLFW/glfw3.h"
Actually it is not good way to install opengl like this. But it is simple to show you how to install opengl.
If you are familiar with visual studio. It is much better making folders of Include and Lib to manage related files. and .dll files should be in build folder with .exe file.
Even though I uploaded opengl for some versions including 64bit Release mode visual studio 2017, you might want to other environment like 32bit Debug mode visual studio 2013... If so, you should build those file you need yourself. You can get ingredient cmake file form opengl website managed by khronos group.
This is end of post.
From Jinseo.
Of course you can use some of engines like Unreal Engine4 or Unity for showing graphics. But it is much better to learn opengl for student who want to study or want to get a scheme of graphics.
You can learn and understand 'lighting', 'shadowing', 'shading', '3D geometry', and a lot of other things deeper (but not easier) than just using engine.
This is the post for how to install opengl in visual studio.
The 'khronos' group offers some of files which can be used to build library for opengl in your computer environment. You can use those file by using 'cmake' software.
But there's already files builded for specific environment like '64bit visualstudio 2013'.
Here's link you can get files for setting opengl in visual studio
https://drive.google.com/file/d/1cMGeEtJSj3EsLywZV0dGABzYixL_9oR9/view?usp=sharing
After unzip files you can see tow folder, one is for glfw and another is for glew.
To install opengl you need both of it(glfw and glew).
Let's install opengl in visual studio now.
I will use visual studio 2015 but other version is similar.
First you should make your own project. if you don't know how make it, please see previous post 'C++ Visual studio_how to use'.
!!make sure your project environment is Release 64bit mode.!!
Second, please open folder of your project.

you can open folder as
1. select the project category like picture above.
2. click mouse right button
3. click 'open folder in file explorer'
Third, copy lib and dll files to folder you opened in second step.
Be careful you should copy right files to your project folder. For example if you use visual studio 2015 you should copy all of files in 'lib-vc2015' (glew32.dll, glew32.lib, glew32s.lib, glfw3.dll, glfw3.lib, glfw3dll.lib)
Fourth, copy GL and GLFW folders to folder you opened in second step.
GL and GLFW folders are located in include folder you downloaded(glew-2.1.0\include, glfw-3.2.1bin.WIN32\include)
Be careful you should copy folder not just file.
Last, please open properties window in visual studio application.

you can open properties window as
1. select the project category like picture above.
2. click mouse right button
3. click 'properties'
you can see properties window like below picture

1. go to Linker tab that is located in left side of property window
2. click the Input tab that is located in sub hierarchy in Linker tab
3. click the Additional Dependencies
4. click small arrow button right side of additional dependencies
5. click <Edit...>
6. do typing (glew32.lib; opengl32.lib; glfw3.lib)

7. select ok button both of Additional dependencies and property window.
now you finished installing opengl in your project
you can use opengl library by adding
#include "GL/glew.h"
#include "GLFW/glfw3.h"
Actually it is not good way to install opengl like this. But it is simple to show you how to install opengl.
If you are familiar with visual studio. It is much better making folders of Include and Lib to manage related files. and .dll files should be in build folder with .exe file.
Even though I uploaded opengl for some versions including 64bit Release mode visual studio 2017, you might want to other environment like 32bit Debug mode visual studio 2013... If so, you should build those file you need yourself. You can get ingredient cmake file form opengl website managed by khronos group.
This is end of post.
From Jinseo.
Comments
Post a Comment