This is a repository which contains empty Visual Studio C++ project ready for development.
Original Learn OpenGL course provides some really nasty and bad practices ragarding C++ project organization and libraries management. Here I povide ready-for-use C++ template project with all Visual studio stuff setup and a guide how to setup all libraries without scattering them all over you machine and hardcoding absolute paths.
You can use this guide instead of Part #1 of original course.
You will need Visual Studio 2022
-
Download GLFW prebuilt binaries for x64 (GLFW Binaries)
-
Create
vendors/glfwdirectory in the project -
Extract
include,lib-vc2022andlisence.mdtovendors/glfw -
Add GLFW to additional include directories in project settings
The path sould be $(SolutionDir)vendors\glfw\include
- Add GLFW library to the list of project libraries.
Path: $(SolutionDir)vendors\glfw\lib-vc2022\glfw3.lib
- Add OpenGL library to the list of project libraries.
opengl32.lib
- Include GLFW to your Main.cpp
#include <glfw/glfw3.h>
int main()
{
}
- Build the project. It should compile successfully.
- Go to [Link] and generate library sources. Set all parameters as on screenshot and press generate
-
Download zip
-
Extract
srcandincludetovendors/glad
- Add GLAD to project include directories.
Path $(SolutionDir)vendors\glad\include
- Add GLAD sources to your project.
Add vendors/glad/src/glad.c
- Include GLAD BEFORE GLFW in your Main.cpp
#include <glad/glad.h>
#include <glfw/glfw3.h>
int main()
{
}
- Build project. All should be OK. You are ready for doing OpenGL stuff now!






