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

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • 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

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 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