How do you use OpenGL without glew or any other libraries?

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

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • OPS - Build and Run Open Source Unikernels
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • OpenGL-Registry

    OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry

    You can find them in glext.h which is put out by Khronos on the official OpenGL-Registry github page. It's probably available elsewhere too but the official online OpenGL docs are kind of a zoo so I probably wouldn't waste too much time looking for them there.

  • GamePhysicsCookbook

    Source code for Game Physics Cookbook

    The other answers are correct, but there's really no particular upside to loading every OpenGL extension you want to use individually yourself. You can still use an extension loader like glad with your win32 program. Here's an example that shows when you should call gladloadgl in a win32 app

  • 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.

  • ImGuizmo

    Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

    ...but if you really want to do it yourself here's an example where they do that. If you want everything it winds up being pretty long.

  • glad

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

    With all that being said, I don't actually recommend that you do this. GLAD for example lets you select what you want to load specifically and will generate a single glad.c and glad.h pair which is very lightweight (it will also include the required Khronos headers that you'll need). If you really want you can poke around and modify these files later, but I see no reason why you wouldn't want to use it.

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