OpenGL Graphics Framework
As part of the Advanced Computer Graphics class at the DigiPen Institute of Technology, we are tasked with creating a graphics framework utilizing the OpenGL API.
My framework is built with C++, Glad, and GLFW.
GLM, STB, and Tiny OBJ Loader are also included for quality of life additions.
Additionally, ImGui is included to provide a user interface with which to change certain parameters of the graphics framework in real-time.
One of the first big tasks in getting this framework up and running is implementing the Phong shading model. OBJ files are loaded into memory and drawn to the screen with shaders written in GLSL. Features include:
support for 16 lights
Phong-Blinn shading
real-time parameter changes to the model’s ambient, diffuse, and specular terms
real-time parameter changes to light properties
Textures are loaded in with the stb-image library. UVs can be generated for the model on the CPU or on the GPU. The texture coordinates can be mapped with cylindrical, spherical, and planar mapping.
A skybox is rendered with depth testing turned off in order to appear in the background.
Cube mapping is implemented by rendering the scene 6 times to an FBO from the perspective of the object.
Reflection and Refraction sample from the generated cube map after appropriate reflection and refraction calculations for each fragment.
Previously much of the project has been rendered using forward rendering. Now the scene can be rendered with a combination of deferred rendering and forward rendering.
Objects such as these high poly power plant models are marked for deferred rendering. Various elements of the model are rendered to render targets part of a g-buffer. These targets are then combined for a final lighting pass.
More light-weight debug objects such as the light orbs and vertex normals are rendered after the deferred rendering pass using forward rendering.
More features to come:
Visualization of more debug objects such as model bounding volumes
Performance improvements utilizing bounding volumes and object culling