Aqeel Tapia
Aqeel Tapia
  • Home
  • My Games
    • Experimental Games
    • Miscellaneous
  • Resume
  • Code Samples
  • Artwork
  • Contact
  • Home
  • My Games
    • Experimental Games
    • Miscellaneous
  • Resume
  • Code Samples
  • Artwork
  • Contact

Engineering II Blog

Assignment 09

11/3/2015

0 Comments

 
​This assignment was relatively simpler and required more redesigning of code. The main redesign was to make our Render() function completely platform independent so as to hide the platform specific code. I chose to make different functions for each of portions since for the most part Direct3D and OpenGl follow the same overall idea implemented in different ways. The specific code is written in each of these separate functions which are called from the Render loop. It then loops through all my renderable objects for bind effects and draw meshes. The image below shows how my implementation looks:
Picture
 The next part was to make our shader code platform independent as far as possible. Using ifdef’s we can make the main loop fairly platform independent as shown. I decided to use vec4 in my main loop since vector4 seems more descriptive to me than float4. 
Picture
Another thing we did to make for platform independent code is to use an include file that has things common to both shaders. To make sure that every time our include file is changed we are also rebuilding our shaders we had to make some tweaks to when our shaders are being rebuilt. Currently, if our shaders are modified after they are built we need to rebuild them. Now, we perform the same check for any files our shaders depend on as well. We do this by adding dependencies for each asset we need to rebuild as shown in the image below. 
Picture
Controls: Use the arrow keys to move the rectangle around.  Escape to exit.
You can download the Direct3D_64 build here.
You can download the OpenGL_32 build here.
0 Comments



Leave a Reply.

    Aqeel Tapia

    This is a blog that documents my work for my graphics Game Engineering class at the University of Utah.

    Archives

    December 2015
    November 2015
    October 2015
    September 2015

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.