How kavan010/2d_opengl_window works
This is a minimal GLFW/GLEW OpenGL application that opens a window and repeatedly clears it to a dark color. main owns the event loop and buffer presentation; Engine initializes the window and graphics context and performs each frame’s OpenGL setup. The source does not show additional rendering, input handling, or product features.
Main entry points: main.cpp Event loop
Components 7
Other components
- Window user
- Event loop
main.cpp - Engine setup
main.cpp - Frame drawing
main.cpp - GLFW
- GLEW
- OpenGL
Connections 11
- Event loop → Engine setup: constructs
- Event loop → GLFW: checks close
- Event loop → Frame drawing: calls per frame
- Event loop → GLFW: swaps buffers
- Event loop → GLFW: polls events
- Event loop → GLFW: terminates
- Window user → GLFW: closes window
- Engine setup → GLFW: initializes window
- Engine setup → GLEW: initializes loader
- Engine setup → OpenGL: sets viewport
- Frame drawing → OpenGL: clears and sets matrices