GLFW is a windowing and input library. It gives you an interface to the operating system.
π GLFW is the OS interface. It talks to Windows, Linux, or macOS to create windows and handle input.
GLAD is an OpenGL function loader. It gives you an interface to the GPU via OpenGL.
glGenVertexArrays
, glShaderSource
, etc.)π GLAD is the GPU interface. It makes sure you can actually call OpenGL functions that live on your GPU driver.
Imagine building a graphics application:
Role | What it does | Example |
---|---|---|
GLFW | Builds the house (window) and opens the door (user input) | βHey OS, give me a window and listen for keypresses!β |
GLAD | Brings the tools (OpenGL functions) | βHey GPU, I want to call glDrawArrays β |