wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 12 people, some anonymous, worked to edit and improve it over time.
This article has been viewed 20,761 times.
Learn more...
This guide will help you get over the first challenge of using OpenGL, GLFW, GLEW, and GLM: Installing and setting them up, and creating your first project with GLFW-GLEW-GLM Template in Visual Studio 2019 or 2022.
It will assume your platform is Windows 10 and your IDE is Visual Studio 2019 or 2022. During Visual Studio installation, check the Desktop development with C++ workload box, also click "Language pack" and check "English" box.
It is addressing the beginner. He can set up GLFW-GLEW-GLM in project with Visual Studio by 3 ways: 1st targeting x32 platform (Parts 1-4), 2nd targeting x64 platform (Parts 5-7), and 3rd set up GLFW-GLEW-GLM source compiled by CMake and Visual Studio (Parts 8-12).
Visual Studio 2019 by default is x32 application, while 2022 is by default x64.
Steps
Part 1
Part 1 of 13:Downloading GLFWx32, GLEWx32, and GLM
-
1Highlight step or sub-step. Highlight step or sub-step you expect to do and then do it. See as example picture above.
-
2Create folder GL. Open Windows's File Explorer > Navigate to disk (directory) C.
- If folder GL already exists it's okay.
- If it doesn't, right click in empty area > select New > Folder > type GL > hit ↵ Enter.
Advertisement -
3Download GLFW. Right click on the following address and select Open Link in New Window https://www.glfw.org/download.html.
- Click 32-bit Windows binaries. You will get "glfw-3.3.4.bin.WIN32" or the latest version.
- Click the download folder "glfw-3.3.4.bin.WIN32" > right click > select copy.
- Navigate to C: > GL > right click > select paste.
- Click on "glfw-3.3.4.bin.WIN32" and rename it to GLFW.
- Now in "GL" folder, you have folder GLFW.
-
4Download GLEW. Right click on the following link and select Open Link in New Window http://glew.sourceforge.net/. Below Downloads, find Binaries and click Windows 32-bit and 64-bit.
- Click the downloaded folder glew-2.1.0 (or latest version) > right click > select Copy.
- Navigate to C: > GL > right click > select Paste.
- (Alternatively, open "Files Explorer" window > C: > GL. Go to downloading window > click downloaded folder and drag into C:\GL)
- Rename glew-2.1.0 to GLEW.
- If the folder glew-2.1.0-win32 has downloaded, double click it for get glew-2.1.0.
-
5Download GLM. Right click on the following address and select Open Link in New Window glm OpenGL mathematics library. In the upper left corner click Download GLM 0.9.9.7 or latest version (see picture above).
- Click downloaded folder "glm" > right click > Copy.
- Navigate to C:\GL > right click > Paste.
- (Alternatively, open "Files Explorer" window > C: > GL. Go to downloading window > click downloaded folder and drag into C:\GL)
- Rename glm to GLM
Advertisement
Part 2
Part 2 of 13:Creating Project targeting x32 Platform
-
1Create folder GLP. Navigate to disk (directory) C.
- If folder GLP already exists it's okay.
- If it doesn't, right click in empty area > select New > Folder > type GLP > hit ↵ Enter.
-
2Create empty project.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
- In Configure your new project wizard, for "Project name", type (or copy and paste): GLFWx32-GLEWx32-GLM-0
- In "Location" delete everything, copy C:\GLP\ and paste.
- Check "Place solution and project in the same directory" > click Create.
- Wait until Visual Studio instance appears.
- If it is open. Click File > New > Project… > Empty Project > Next. The rest as above.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
-
3Add your source file to the project.
- In Visual Studio GUI, Solution Explorer wizard, right click the Source Files entry (the last one) > select Add > New Item….
- In the Add New Item - GLFWx32-GLEWx32-GLM-0 wizard, click C++ File (.cpp) (the first one) from the middle of the window. In Name text box type Main.cpp.
- Location should be C:\GLP\GLFWx32-GLEWx32-GLM-0\
- Click the Add button. The file will open in the main text editor but leave the file blank for now.
Advertisement
Part 3
Part 3 of 13:Setting up GLFWx32, GLEWx32, and GLM in the Project
-
1Configure "Property Pages". Go to "Solution Explorer" > right click on the name of your project GLFWx32-GLEWx32-GLM-0 > select "Properties". In "GLFWx32-GLEWx32-GLM-0 Property Pages" wizard,
-
1. Main menu. In Configuration entry select Active(Debug) > in Platform: entry, select "x32" or "Win32" > Click {{macButton|Configuration manager...}. In Configuration Manager wizard,
- Active solution platform: select "x32" or "x86"
- Platform entry, "x32" or "Win32" is automatically selected.
- Click Close
-
2. Additional Include Directories. In GLFWx32-GLEWx32-GLM-0 Property Pages window double click C/C++ > click General > Additional Include Directories > down arrow at the end of the field > click <Edit...>.
- Copy C:\GL\GLFW\include and paste in Additional Include Directories wizard's upper-most text field.
- Copy C:\GL\GLEW\include and paste in Additional Include Directories wizard's upper-most text field.
- Copy C:\GL\GLM and paste in Additional Include Directories wizard's upper-most text field.
- In Additional Include Directories wizard click OK.
-
3. Additional Library Directories. In "GLFWx32-GLEWx32-GLM-0 Property Pages" wizard, double click Linker > click General > Additional Library Directories > down arrow at the end of the field > click <Edit... >.
- Copy C:\GL\GLFW\lib-vc2019 and paste in Additional Library Directories wizard's upper-most text field.
- Copy C:\GL\GLEW\lib\Release\Win32 and paste in Additional Library Directories wizard's upper-most text field.
- Click OK in Additional Library Directories wizard.
-
4. Additional Dependencies. In "Linker" drop down menu, click Input > Additional Dependencies > down arrow at the end of the field > click <Edit...>.
- #* Copy opengl32.lib; glfw3.lib; glfw3dll.lib; glew32.lib and paste on the top-most text box of the Additional Dependencies wizard.
- In "Additional Dependencies" wizard click OK.
- 5. System. In Linker dropdown menu click System > SubSystem > down arrow at the end of the field > select Console (/SUBSYSTEM:CONSOLE) > click Apply and then OK.
-
1. Main menu. In Configuration entry select Active(Debug) > in Platform: entry, select "x32" or "Win32" > Click {{macButton|Configuration manager...}. In Configuration Manager wizard,
-
2Copy glew32.dll file and paste to GLFWx32-GLEWx32-GLM-0 project-folder
- Navigate to C: > GL > GLEW > bin > Release > Win32. Click glew32.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWx32-GLEWx32-GLM-0. Right-click an empty area in GLFWx32-GLEWx32-GLM-0 folder, and select Paste.
- The glew32.dll file should now be in GLFWx32-GLEWx32-GLM-0 project-folder along with Main.cpp, and 4 other files created by Visual Studio. If these files are missing, you missed create file "Main.cpp". Go to Part 2, step 3 and create it now.
-
3Test your project. Right click on following address and select Open Link in New Window tutorial01.cpp. Copy the code and paste in Main.cpp code area. Hit Ctrl+F5. Two windows should appear. One black and other blue.
- If only the black window (the console) appears with message: "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorial.", set up is okay, but function glfwCreateWindow did not work.
-
4Correct any errors. In "Error List" if you see error about
- file with extension .h go to Part 3, step 1, Additional Include Directories and follow instructions.
- file with extension .lib go to Part 3, step 1, Additional Library Directories, and follow instructions. Also to Additional Dependencies.
- "entry point must be defined" go to Part 3, step 1, System, and follow instructions.
- file .dll go to step 2 and follow instructions.
- For other errors, if you can not correct them, close Visual Studio > delete project folder GLFWx32-GLEWx32-GLM-0 which lives in C:\GLP > open Visual Studio > repeat set up from Part 2. Good job.
Advertisement
Part 4
Part 4 of 13:Creating project with Template targeting x32 Platform
-
1Create Template. Go to Visual Studio main menu and, while GLFWx32-GLEWx32-GLM-0 is open, click Project > Export Template....
- On Export template Wizard check Project Template, if it's not checked > click Next >.
- On "Export Template Wizard" (Select Template Options), in Template name text box delete everything, copy GLFWx32-GLEWx32-GLM and paste > click Finish. The Template has been created. Delete opened window with template's address.
-
2Create your project.
- Click File > New > Project....
- In Create a new project wizard, in the list of templates, select GLFWx32-GLEWx32-GLM (if necessary scroll dow the list of templates) > click Next.
- In the Configure your new project wizard, in "Project name" text field, type (or copy and paste) GLFWx32-GLEWx32-GLM-1
- Location should be C:\GLP. If it's not, copy C:\GLP and paste.
- Be sure Place solution and project in the same directory is checked. Click Create.
-
3Add source File. In Visual Studio main menu, select x86. In Solution Explorer menu double click Source Files > click Main.cpp. Code should appear on V.S. code area. You can modify or change code if you desire.
-
4Copy glew32.dll file and paste in GLFWx32-GLEWx32-GLM-1 project-folder
- Navigate to C: > GL > GLEW > bin > Release > Win32. Click glew32.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWx32-GLEWx32-GLM-1. Right-click an empty area in GLFWx32-GLEWx32-GLM-1 project-folder, and select Paste.
- The glew32.dll file should now be in GLFWx32-GLEWx32-GLM-1 project-folder along with Main.cpp, and 4 other files created by Visual Studio.
- Run program. Good job.
-
5Tips. When you create project with template, remember
- Select x86
- Copy glew32.dll file from library-folder or previous project-folder and paste in the new one.
Advertisement
Part 5
Part 5 of 13:Creating Project to target x64 Platform
-
1Create folder GL. Open Windows's File Explorer > Navigate to disk (directory) C.
- If folder GL already exists it's okay.
- If it doesn't, right click in empty area > select New > Folder > type GL > hit ↵ Enter.
-
2Download GLFW 64 bits. Right click on following address and select Open Link in New Window https://www.glfw.org/download.html.
- Click 64-bit Windows binaries. You get "glfw-3.3.4.bin.WIN64" or latest version.
- Click folder > right click > Copy.
- Navigate C:\GL > right click > Paste.
- Rename folder "glfw-3.3.4.bin.WIN64" to GLFWx64
-
3Download GLEW and GLM as above, Part 1, steps 4, 5.
-
4Create empty project.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
- In Configure your new project wizard, for "Project name", type (or copy and paste): GLFWx64-GLEWx64-GLM-0
- In "Location" delete everything, copy C:\GLP\ and paste.
- Check "Place solution and project in the same directory" > click Create.
- Wait until Visual Studio instance appears.
- If it is open. Click File > New > Project… > Empty Project > Next. The rest as above.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
-
5Add your source file to the project.
- In Visual Studio GUI, Solution Explorer wizard, right click the Source Files entry (the last one) > select Add > New Item….
- In the Add New Item - GLFWx64-GLEWx64-GLM-0 wizard, click C++ File (.cpp) (the first one) from the middle of the window. In Name text box type Main.cpp.
- Location should be C:\GLP\GLFWx64-GLEWx64-GLM-0\
- Click the Add button. The file will open in the main text editor but leave the file blank for now.
Advertisement
Part 6
Part 6 of 13:Setting up GLFWx64, GLEWx64, and GLM in the Project
-
1Configure "Property Pages". Go to "Solution Explorer" > right click on the name of your project GLFWx64-GLEWx64-GLM-0 > select "Properties". In "GLFWx64-GLEWx64-GLM-0 Property Pages" wizard,
-
1. Main menu. In Configuration entry select Active(Debug) > in Platform: entry, select "x64" > Click {{macButton|Configuration manager...}. In Configuration Manager wizard,
- Active solution platform: select "x64"
- Platform entry, "x64" is automatically selected.
- Click Close
-
2. Additional Include Directories. In GLFWx64-GLEWx64-GLM-0 Property Pages window double click C/C++ > click General > Additional Include Directories > down arrow at the end of the field > click <Edit...>.
- Copy C:\GL\GLFW\include and paste in Additional Include Directories wizard's upper-most text field.
- Copy C:\GL\GLEW\include and paste in Additional Include Directories wizard's upper-most text field.
- Copy C:\GL\GLM and paste in Additional Include Directories wizard's upper-most text field.
- In Additional Include Directories wizard click OK.
-
3. Additional Library Directories. In "GLFWx32-GLEWx32-GLM-0 Property Pages" wizard, double click Linker > click General > Additional Library Directories > down arrow at the end of the field > click <Edit... >.
- Copy C:\GL\GLFWx64\lib-vc2019 and paste in Additional Library Directories wizard's upper-most text field.
- Copy C:\GL\GLEW\lib\Release\x64 and paste in Additional Library Directories wizard's upper-most text field.
- Click OK in Additional Library Directories wizard.
-
4. Additional Dependencies. In "Linker" drop down menu, click Input > Additional Dependencies > down arrow at the end of the field > click <Edit...>.
- Copy opengl32.lib; glfw3.lib; glfw3dll.lib; glew32.lib and paste on the top-most text box of the Additional Dependencies wizard.
- In "Additional Dependencies" wizard click OK.
- 5. System. In Linker dropdown menu click System > SubSystem > down arrow at the end of the field > select Console (/SUBSYSTEM:CONSOLE) > click Apply and then OK.
-
1. Main menu. In Configuration entry select Active(Debug) > in Platform: entry, select "x64" > Click {{macButton|Configuration manager...}. In Configuration Manager wizard,
-
2Copy glew32.dll file and paste into GLFW64-GLEW64-GLM-0 project-folder. In Windows's "File Explorer" navigate to
- C: > GL > GLEW > bin > Release > x64. In "x64" folder click "glew32.dll" file > right-click > "Copy".
- C: > GLP > GLFW64-GLEW64-GLM-0. Right-click on empty area in '"GLFW64-GLEW64-GLM-0'" project-folder, and select "Paste".
-
3Test project and correct errors if any. As above, Part 3, steps 7, 8.
- TIP: Even if in Property Pages main settings it is Platform: x64, click Configuration manager..., and in Active solution platform: select x64.
Advertisement
Part 7
Part 7 of 13:Creating Project targeting x64 Platform, with Template
-
1Create Template. Go to Visual Studio main menu and, while GLFWx64-GLEWx64-GLM-0 is open, click Project > Export Template....
- On Export template Wizard check Project Template, if it's not checked > click Next >.
- On "Export Template Wizard" (Select Template Options), in Template name text box delete everything, copy GLFWx64-GLEWx64-GLM and paste > click Finish. The Template has been created. Delete opened window with template's address.
-
2Create your project.
- Click File > New > Project....
- In Create a new project wizard, in the list of templates, select GLFWx64-GLEWx64-GLM (if necessary scroll dow the list of templates) > click Next.
- In the Configure your new project wizard, in "Project name" text field, type (or copy and paste) GLFWx64-GLEWx64-GLM-1
- Location should be C:\GLP. If it's not, copy C:\GLP and paste.
- Be sure Place solution and project in the same directory is checked. Click Create.
-
3Add source File. In Visual Studio main menu, select x64. In Solution Explorer menu double click Source Files > click Main.cpp. Code should appear on V.S. code area. You can modify or change code if you desire.
-
4Copy glew32.dll file and paste in GLFWx64-GLEWx64-GLM-1 project-folder
- Navigate to C: > GL > GLEW > bin > Release > x64. Click glew32.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWx64-GLEWx64-GLM-1. Right-click an empty area in GLFWx32-GLEWx32-GLM-1 project-folder, and select Paste.
- The glew32.dll file should now be in GLFWx64-GLEWx64-GLM-1 project-folder along with Main.cpp, and 4 other files created by Visual Studio.
- Run program. Good job.
-
5Tips. When you create project with template, remember
- Select x64
- Copy glew32.dll file from library-folder or previous project-folder and paste in the new one.
Advertisement
Part 8
Part 8 of 13:Downloading source GLFW, source GLEW, and source GLM
-
1Create folder GL. Open Windows's File Explorer > Navigate to disk (directory) C.
- If folder GL already exists it's okay.
- If it doesn't, right click in empty area > select New > Folder > type GL > hit ↵ Enter.
-
2Install CMake. Right-click on following link and select Open Link in New Window Use CMake to Get Binaries from Source Code. Follow Part 1 Installing CMake.
-
3Download GLFW source. Right-click on following address and select Open Link in New Window https://www.glfw.org/download.html. Select "Source package".
- In downloading window click folder "glfw-3.3.4" (or latest version) > right click > select Copy.
- In File Explorer navigate to C:\ > GL > right click > select Paste. Click twice on folder's name > delete name > type: GLFWsrc > hit ↵ Enter.
-
4Download GLEW source. Right-click on following address and select Open Link in New Window http://glew.sourceforge.net/. Beside Source click ZIP.
- In downloading window click folder "glew-2.1.0" (or latest) > right click > Copy.
- Navigate to C:\ > GL. Right click > Paste. Click twice on folder's name and rename GLEWsrc > hit ↵ Enter. Now in folder GL you have folders GLFWsrc and GLEWsrc, perhaps among others.
-
5Download GLM if it's not have been already downloaded. Go to Part 1 and follow step 5.Advertisement
Part 9
Part 9 of 13:Building source GLFW, source GLEW, and source GLM
-
1Build GLFW by CMake and Visual Studio. Go to CMake GUI.
- Copy (Be careful do not copy any blank space) C:/GL/GLFWsrc and paste in first text field.
- Copy (Be careful do not copy any blank space) C:/GL/GLFWsrc/build and paste in second text field ("Where to build the binaries:").
- Configure and generate. In CMake GUI, click Configure > in wizard Create Directory click Yes > select Visual Studio 16 2019 > click Finish.
- When, in CMake GUI, you read: "Configuring done", click Generate. You should read: "Generating done".
- Build your solution.
- Navigate to C: > GL > GLFWsrc > build. Double click "GLFW.sln", or "GLFW", or "ALL_BUILD.vcxproj". An instance of Visual Studio appears. Wait until in main menu Build entry appears. Click it > "Build Solution".
- Wait till you read the last line in "Output" window: ========== Build: 32 succeeded, 0 failed, 0 up-to-date, 2 skipped" ==========
- Number of "succeeded" changes in glfw versions.
- Navigate to C:\ > GL > GLFWsrc > build > src > Debug. Inside you should see file glfw3.lib.
-
2Build GLEW by CMake and Visual Studio. Follow above step but
- Copy (Be careful do not copy any blank space) C:/GL/GLEWsrc/build/cmake and paste in first text field.
- Copy (Be careful do not copy any blank space) C:/GL/GLEWsrc/build and paste in second text field.
- Navigate to C: > GL > GLEWsrc > build. Double click "glew.sln", or "glew", or "ALL_BUILD.vcxproj".
- In V.S. Output wizard, number of succeeded today (31-1-2020) is 6, may change in later version though.
- Navigate to C: > GL > GLEWsrc > build > lib > Debug. Inside you should see file glew32d.lib among other files.
-
3Build GLM by CMake and Visual Studio. Follow step 6 (of this Part) Build GLFW by CMake and Visual Studio but...
- For first text field, copy (attention: do not copy any blank space) and paste C:/GL/GLM
- For second text field copy (attention: do not copy any blank space) and paste C:/GL/GLM/build
- Navigate to C: > GL > GLM > build. Double click the file "ALL_BUILD.vcxproj" or the file (not the folder) "glm".
- In V.S. Output wizard, number of succeeded today (31/08/2021) is 165, may change in later version though.
- If number of succeeded is less than 165, delete CMake GUI > go to C: > GL > double click "cmake-3.21.2-windows-x86_64" > double click "bin" > double click file "cmake-gui". New CMake GUI appears. Follow present step (#8).
- Navigate to C: > GL > GLM > build > glm > Debug. Inside you should see file glm_static.lib among other files.
Advertisement
Part 10
Part 10 of 13:Creating Project GLFWsrc-GLEWsrc-GLMsrc-0
-
1Create folder GLP. Navigate to disk (directory) C.
- If folder GLP already exists it's okay.
- If it doesn't, right click in empty area > select New > Folder > type GLP > hit ↵ Enter.
-
2Create empty project.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
- In Configure your new project wizard, for "Project name", type (or copy and paste): GLFWsrc-GLEWsrc-GLMsrc-0
- In "Location" delete everything, copy C:\GLP\ and paste.
- Check "Place solution and project in the same directory" > click Create.
- Wait until Visual Studio instance appears.
- If it is open. Click File > New > Project… > Empty Project > Next. The rest as above.
-
If Visual Studio is not open. Open it > Click Create a new project > Empty Project > Next.
-
3Add your source file to the project.
- In Visual Studio GUI, Solution Explorer wizard, right click the Source Files entry (the last one) > select Add > New Item….
- In the Add New Item - GLFWsrc-GLEWsrc-GLMsrc-0 wizard, click C++ File (.cpp) (the first one) from the middle of the window. In Name text box type Main.cpp.
- Location should be C:\GLP\GLFWsrc-GLEWsrc-GLMsrc-0\
- Click the Add button. The file will open in the main text editor but leave the file blank for now.
Advertisement
Part 11
Part 11 of 13:Setting up built GLFW, built GLEW and built GLM in the project
-
1Configure project's Properties. In Solution Explorer wizard, right click Project's name that is GLFWsrc-GLEWsrc-GLMsrc-0 > select Properties.
-
(1) In GLFWsrc-GLEWsrc-GLMsrc-0 Property Pages main menu. In Platform entry select x64 > click Configuration Manager....
- In Active solution platform: select x64.
- In Platform entry, x64 is automatically selected.
- Click Close.
-
(2) Additional Include Directories. Click C/C++ > General > In beside menu select the first one, Additional Include Directories > click the down arrow at the end of the field > click Edit....
- Copy C:\GL\GLFWsrc\include > in "Additional Include Directories" wizard click first icon > paste in the uppermost text field.
- Copy C:\GL\GLEWsrc\include > click again first icon > paste.
- Copy C:\GL\GLM > click once more first icon > paste.
- In "Additional Include Directories" wizard click OK.
-
(3) Additional Library Directories. Double click Linker > click General > Additional Library Directories > click the down arrow at the end of the field > click Edit....
- Copy C:\GL\GLFWsrc\build\src\Debug > in Additional Library Directories" wizard click first icon > paste in upper-most text field.
- Copy C:\GL\GLEWsrc\build\lib\Debug > click again first icon > paste.
- Copy C:\GL\GLM\build\glm\Debug > click once more first icon > paste.
-
(4) Additional Dependencies. In Linker drop-down menu select Input > in beside menu select the first one, Additional Dependencies > click the down arrow at the end of the field > Edit....
- Copy opengl32.lib; glfw3.lib; glew32d.lib; glm_static.lib > paste in "Additional Dependencies" wizard's upper-most text box.
- In "Additional Dependencies" wizard click OK.
- (5) Set System to SubSystem CONSOLE. In Linker drop-down menu select System > in beside menu select the first one, SubSystem > click the down arrow at the end of the field > select Console (/SUBSYSTEM:CONSOLE). Click Apply and OK.
-
(1) In GLFWsrc-GLEWsrc-GLMsrc-0 Property Pages main menu. In Platform entry select x64 > click Configuration Manager....
-
2Copy glew32d.dll file and paste into GLFWsrc-GLEWsrc-GLMsrc-0 project-folder.
- Navigate to C: > GL > GLEWsrc > build > bin > debug. Click glew32d.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWsrc-GLEWsrc-GLMsrc-0. Right-click an empty area in GLFWsrc-GLEWsrc-GLMsrc-0 project-folder, and select Paste.
-
3Copy glm_shared.dll file and paste into GLFWsrc-GLEWsrc-GLMsrc-0 project-folder.
- Navigate to C: > GL > GLM > build > glm > Debug. Click glm_shared.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWsrc-GLEWsrc-GLMsrc-0. Right-click an empty area in GLFWsrc-GLEWsrc-GLMsrc-0 project-folder, and select Paste.
- glew32d.dll and glm_shared.dll files should now be in GLFWsrc-GLEWsrc-GLMsrc-0 project-folder along with Main.cpp, and 4 other files created by Visual Studio.
-
4Test your project and correct errors if any. Go to Part 3, and follow steps 7 and 8.Advertisement
Part 12
Part 12 of 13:Creating Project with GLFWsrc-GLEWsrc-GLMsrc Template
-
1Create Template. Go to Visual Studio main menu and, while GLFWsrc-GLEWsrc-GLMsrc-0 is open, click Project > Export Template....
- On Export template Wizard check Project Template, if it's not checked > click Next >.
- On "Export Template Wizard" (Select Template Options), in Template name text box delete everything, copy GLFWsrc-GLEWsrc-GLMsrc and paste > click Finish. The Template has been created. Delete opened window with template's address.
-
2Create your project.
- Click File > New > Project....
- In Create a new project wizard, in the list of templates, select GLFWx64-GLEWx64-GLM (if necessary scroll dow the list of templates) > click Next.
- In the Configure your new project wizard, in "Project name" text field, type (or copy and paste) GLFWsrc-GLEWsrc-GLMsrc-1
- Location should be C:\GLP. If it's not, copy C:\GLP and paste.
- Be sure Place solution and project in the same directory is checked. Click Create.
-
3Add source File. In Visual Studio main menu, select x64. In Solution Explorer menu double click Source Files > click Main.cpp. Code should appear on V.S. code area. You can modify or change code if you desire.
-
4Copy glew32.dll file and paste in GLFWsrc-GLEWsrc-GLMsrc-1 project-folder
- Navigate to C: > GL > GLEW > bin > Release > x64. Click glew32.dll > right-click > Copy.
- Navigate to C: > GLP > GLFWsrc-GLEWsrc-GLMsrc-1. Right-click an empty area in GLFWx32-GLEWx32-GLM-1 project-folder, and select Paste.
- The glew32.dll file should now be in GLFWsrc-GLEWsrc-GLMsrc-1 project-folder along with Main.cpp, and 4 other files created by Visual Studio.
- Run program. Good job.
-
5Tips. When you create project with template, remember
- Select x64
- Copy glew32.dll file from library-folder or previous project-folder and paste in the new one.
Advertisement
Part 13
Part 13 of 13:Choosing Set Up
-
1In this tutorial you learn 3 was to set GLFW, GLEW and GLM in Project with Visual Studio.
- Set up binaries x86 (32 bits). It's the easiest. You should start learning set up from here.
- Set up binaries x64 (64 bits). It targets x64 platform. Choose it only when you have specific reason for doing so.
- Compile GLFW source, GLEW source, GLM source, and set up them in project. Targets x64 too.The most difficult. The best though.






-Step-16-Version-3.webp)




















































