Download this game here. Controls: Esc – Exit.

- Assignment Goal:
- To further the platform independence of the Graphics class.
- To make the Effect into an instanced object.
- To make the Geometry class into a general usage interfaced class.
- Viewer Class:
- By looking at the differences between the two Graphics files, I deduced which parts would need to be separated into a new class.
- I decided to name the new class Viewer, as it had a lot to do with the way things were displayed.
- The interface functions in cViewer.h:
- InitializeViewer: Sets up the viewer object.
- ClearFrame: Clears the back of the frame.
- Render: Draws buffers to the screen.
- CleanUp: Releases all owned objects.
- These functions are defined twice each in cViewer.d3d.cpp and cViewer.gl.cpp.
- Sizes:
- cEffect:
- x86 – 16 bytes
- x64 – 12 bytes
- cGeometry3D:
- x86 – 16 bytes
- x64 – 24 bytes
- It may be possible to reduce sizes by switching to different types, but I am not entirely sure if this would be possible.
- cEffect:
- How I Did it:
- The easiest way to combine different sections of code is to open them side-by-side.
- Combining like pieces into a separate class, and marking differences for transplantation into platform-specific functions.
- Deciding on what was necessary function parameters

(Red, Blue, Green, Alpha)

(Vertex Shader Name, Fragment Shader Name)

(Vertex Data Count, Vertices, Index Data Count, Indices)