Skip to content

petegilb/learningopengl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

learningopengl

A C++ OpenGL learning project following learnopengl.com, used as a hands-on way to study graphics programming and C++.

What it does

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.

Tech Stack

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)

Controls

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

Building

cmake -B build
cmake --build build

Dependencies (GLFW, GLM) are fetched automatically via CMake FetchContent.

About

My process of learning OpenGL with https://learnopengl.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors