Download this game here. Controls: Esc – Exit.

The Incredible Game 03
  1. 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.
  2. 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
  3. 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.
  4. 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
Clearing the Back Buffer Color in Graphics.cpp
(Red, Blue, Green, Alpha)
Initializing Shading Data in Graphics.cpp
(Vertex Shader Name, Fragment Shader Name)
Initialize Geometry in Graphics.cpp
(Vertex Data Count, Vertices, Index Data Count, Indices)