How do I get OpenGL working in a c++ vscode project?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • OPS - Build and Run Open Source Unikernels
  • glad

    Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.

    I only remember how for mingw64, but its probably a similar process. 1 - Compile glfw in cmake, build it with vstudio (this makes two .h files if im not wrong). 2 - use this to get a glad.h file: 3 - Put all the .h files in your project folder (or in the mingw include folder) 4 - You need to link some libraries in the tasks.json file (if you dont have one search it up) Here's the ones I have linked:

  • LearnOpenGL

    Code repository of all OpenGL chapters from the book and its accompanying website

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • glew-cmake

    GLEW(, source updated nightly) with Cmake and pre-generated sources

    I did it by using CMake and simply linking my executable with glew-cmake.

  • Basilisk

  • opengl-imgui-cmake-template

    👾 template repo for getting started with opengl together with imgui using cmake

    github template repo

  • TabGraph

    Simple Scenegraph featuring Physically Based Rendering

    Here you can find my toy engine, the CMakeLists may be a bit of a mess though, I am kind of a beginner when it comes to using CMake, but the idea is to let CMake generate the Visual Studio files and folders architectures on its own, it's a very powerful tool, very useful if you ever want to go cross-platform.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts