OpenGLRenderer
A from-scratch 3D renderer in C++ on OpenGL 3.3: Assimp model loading, a custom GLSL forward-lighting pipeline (directional/point/spot lights, Phong shading), and a fly-style first-person camera.
OpenGLRenderer is a from-scratch 3D renderer written in C++ on the OpenGL 3.3 core profile — a learning engine with no framework, scene graph, or ECS, just the raw OpenGL plumbing to get textured, lit 3D geometry on screen.
It loads OBJ models via Assimp (with Triangulate / FlipUVs / GenSmoothNormals / JoinIdenticalVertices), renders textured meshes through a custom GLSL shader pipeline, and implements a full multi-light forward-lighting model: directional, point, and spot lights with Phong ambient/diffuse/specular shading and material properties. MAX_POINT_LIGHTS/MAX_SPOT_LIGHTS are kept in sync between C++ and the fragment shader.
A fly-style first-person camera (WASD + mouse-look) navigates a small scene containing procedural cube grids, a ground plane, and several classic test models (Stanford bunny, horse, teapot, Suzanne, a building). One spot light is repositioned each frame to act as a flashlight attached to the camera. A GLCall macro + glDebugMessageCallback provide two independent error paths.
Key features
- OpenGL 3.3 core-profile renderer in C++ with GLFW/GLEW — no engine framework.
- Assimp OBJ loading (Triangulate / FlipUVs / GenSmoothNormals / JoinIdenticalVertices).
- Custom GLSL forward-lighting pipeline: directional + point + spot lights, Phong shading, materials.
- Fly-style first-person camera (WASD + mouse-look, yaw/pitch, view matrix).
- Procedural cube generation (line / 10×10 plane / 6×6×6 chunk) with interleaved pos/uv/normal layout.
- stb_image texture loading with mipmaps; GLCall macro + glDebugMessageCallback error paths.
- C++/GLSL uniform-struct mirroring for point/spot light arrays.