bandicam 2015-11-02 15-56-35-298

Game Engineering || – EAE 6320 – Assignment_09

The main objective of this assignment was to make the Render() platform independent. So as you can see the picture  below I have split the Render in for Direct3D and OpenGL into Clear(), BeginDraw(), EndDraw() an ShowBuffer().

So there is basically no platform specific code within this Render function . It is platform independent. The implementation or the details would obviously differ depending on the platform. So the Clear() function basically clears the screen to black. We have the BeginDraw() and EndDraw() for the D3D implementation . For OpenGL I am just returning true for both the functions.

bandicam 2015-11-03 17-14-16-108

Below is the screen shot of my vertex shader . Had to take two screenshots so its half and half because it didnt fit the screen.

bandicam 2015-11-03 17-18-48-408

bandicam 2015-11-03 17-18-18-464

The vertex shader includes the which makes things more platform independent. I have also made the output position calculation platform independent. For calculating the output positions , I am however using the #if defined for OpenGL and Direct3D . The g_offset position is again common for both the OpenGL and Direct3D platforms.

My AssetsToBuild.lua screenshot is as shown in the image below where I have added the dependencies.

bandicam 2015-11-03 17-35-58-712

It took me around 6 hours to finish this assignment.

You can download the Zip File of Assignment_09 from the following link to get the square output. Use the arrow keys to move the red square.


After downloading the link run Game.exe.

Leave a Reply