Write Up 02


































Press Escape to quit the application.

While working on assignment 02, I ran the Graphics Analyzer debugger and got the following captures for Direct3D:

The ClearRenderTargetView() function

The Draw () function

I then downloaded and ran the RenderDoc program to debug the stages of the OpenGL version of my application. I got the following captures:


The glClear() function

The glDrawArrays() function with Texture View

The glDrawArrays() function with Mesh Output

The following code shows the use of the platform independent interfaces of effect and sprite in the Graphics.d3d.cpp file:

// Bind the shading data





       // Draw the geometry


The remaining differences between Graphics.d3d.cpp and Graphics.gl.cpp are the following:

  • Graphics.d3d.cpp has an additional InitializeViews() function which Graphics.gl.cpp does not have.

  • Graphics.d3d.cpp has to release the pointers s_renderTargetView and s_depthStencilView in its CleanUp() function while Graphics.gl.cpp does not.

  • Graphics.d3d.cpp calls the InitializeViews() function in its Initialize() function while Graphics.gl.cpp does not.

  • The code in the RenderFrame() function that clears the previous image is different in  Graphics.d3d.cpp and Graphics.gl.cpp.

  • Graphics.d3d.cpp needs to get the immediate Direct3D context which Graphics.gl.cpp does not.

All of these differences are quite big. To make a single Graphics.cpp file I would make separate functions for each difference called from another interface where each platform has its own implementation. This would create another abstraction layer.

I went ahead and drew a house shape by adding 6 triangles with additional vertices.























I struggled a lot when trying to see the output of the Graphics Analyzer’s Pipeline Stages’ tab when debugging my Direct3D build. This caused me to lose vast amounts of time. In the end I had to run my project on a windows 10 computer.


The time it took me to complete this assignment was 15 hours.