Assignment 02
September 5, 2026
Intro
This week, I dug deeper into the Graphics library for my Engine Project. The objective was to abstract out geometry and shader logic into their own classes, cMesh and cEffect respectively.
Gameplay Footage
Now that meshes have been abstracted away, it is far easier to create additional triangles per mesh, without the primary Graphics.[platform].cpp needing to be aware of the specific geometry. There is still additional technical debt that needs to be addressed before easily adding multiple meshes to the scene. The mesh class is still hard-coded to render a specific mesh of two triangles, but the refactoring done this week will make that next refactor significantly easier to isolate and reason about.
Graphics Debugging Tools
Part of this assignment was to learn how to use different Graphics Debugging Tools. I have experience using NVIDIA Nsight Graphics, so these new tools were fairly easy for me to setup and understand. The assignment tasked us with using Visual Studio Graphics Analyzer for the D3D11 implementation and RenderDoc for the OpenGL implementation. It is incredibly convenient to have the Visual Studio Graphics Analyzer accessible from within my IDE, even by shortcut (Alt+F5), so I will likely be using that for most of my debugging in this class. However, I think my favorite tool may still be NVIDIA Nsight Graphics since the layout and accessible features feel most intuitive to me.
Visual Studio Graphics Analyzer
ClearRenderTargetView()

Draw()

Pipeline Stages

RenderDoc
glClear()

glDrawArrays()

VS Output

Additional Thoughts
All of the code for binding the shader programs and drawing the geometry has been moved into the cEffect and cMesh classes, meaning that the primary eae6320::Graphics::RenderFrame function in each of the Graphics.[platform].cpp files has been significantly simplified into the following:
1
2
s_effect->Bind();
s_mesh->Draw();
With the hundreds of lines of platform specific code for geometry and shading data moved into new files, the amount of duplicate code in the Graphics.[platform].cpp files is far more apparent. The only significant differences the Direct3D View and some of the final rendering function calls. Therefore, it should be straightforward to continue reducing duplicate code in the next assignment.