What was the point of the assignment?
The point of this assignment was to learn about different ways to handle platform specific code and how to implement a platform independent interface. We also learned about the difference between right handed OpenGL and left handed Direct 3D.
What did you do personally to complete the assignment?
For this assignment I created to classes called cGeometry and cEffect in order to store the information used by the Graphics project as detailed in the instructions. I then used them to create a square image rather than the initial triangle.
Did you get any help from a fellow student?
Yes, I received some help from Boson and Emma on this assignment. I had a few issues with passing in pointers and Boson was able to help me out. Emma also helped me with getting the GPU captures.
Tell us (in general terms) what the remaining differences are between Graphics.d3d.cpp and Graphics.gl.cpp. Discuss any ways that you can think of to use platform-independent code to eliminate those differences so that only a single platform-independent Graphics.cpp file would be necessary.
- Platform specific code that creates the window where graphics are displayed.
- Platform specific clean up.
- Platform specific buffer clearing.
Differences can be eliminated by using preprocessor logic and putting it all in one platform independent implementation. We could create a single class that initializes and maintains the window that under the hood would use either OpenGL or Direct3D logic.
All required screenshots can be found on the screenshot panel on the right ->