A C++ OpenGL learning project following learnopengl.com, used as a hands-on way to study graphics programming and C++.
Renders a 3D scene with two cubes: a textured lit cube and a smaller light source cube. The light position animates over time. Features a free-look camera controllable via mouse and keyboard. I followed along with the chapters while I was reading so the commits contain a history of changes, including displaying a basic triangle, plane, etc.
Chapters covered so far:
- Colors
- Basic lighting (Phong shading — ambient, diffuse, specular)
- Materials (material + light structs in shaders)
- Lighting maps (diffuse + specular texture maps)
- etc.
| Language | C++20 |
| Build system | CMake (with FetchContent for dependencies) |
| Windowing / input | GLFW 3.4 |
| OpenGL loader | GLAD |
| Math | GLM 1.0.1 |
| Image loading | stb_image |
| Shaders | GLSL (OpenGL 3.3 Core Profile) |
| Key | Action |
|---|---|
W/A/S/D |
Move forward/left/back/right |
Q / E |
Move down / up |
Mouse |
Look around |
Scroll |
Zoom (FOV) |
Left Shift |
Toggle wireframe |
Esc |
Quit |
cmake -B build
cmake --build buildDependencies (GLFW, GLM) are fetched automatically via CMake FetchContent.