Changes

Jump to: navigation, search

User:Akopytov

697 bytes added, 17:13, 13 May 2013
Lighting Project
Name: Andrei Kopytov
Seneca e-mail address: [mailto:akopytov@learn.senecac.onmyseneca.ca akopytov@learnmyseneca.senecacca] == Lighting Project==<h3>NOTE: This project used the Winter 2011 version of the game framework, which has since been extensively modified.onThe majority of these instructions are outdated and invalid.ca]</h3>
== Lighting ==
Instructions to incorporate advanced lighting into your game:<br />
Download the full working solution here:[http://matrix.senecac.on.ca/~satijas/Lighting_-_Full_Solution.zip Download]<br />
OR<br />
Download just the files that have changes relevant to lighting here:[http://matrix.senecac.on.ca/~satijas/Lighting.zip Download]<br /> 
<h3>WARNING: This Feature has been implemented using solution 28. Modification and additional coding may be required to prior and later solutions.</h3>
Copy from the files or manually code the following:<br />
*Add void populateLightingList(void*); to the header file (Line 54)
<b>UserDialog.cpp</b>
*Set the previously created wchar_t variable to an empty string (Line 48)
*Call the populateLightingList(hwnd) function in populateUserDialog (Line 88)
*Store the lighting description inside of the wchar_t variable (Line 594)
<b>iObject.h</b>
*Declare the LightAlgorithm enum (Line 26)
*Declare the get and set functions for the input variables, remove the parameter from power() (Line 43-50)
<b>Object.h</b>
*Change the shine variable from float* to float (Line 41)
*Add a float variable for roughness (Line 42)
*Define the get and set functions (Line 78-85)
<b>Object.cpp</b>
*Set the iContext* variable to NULL (Line 37)
*Remove the iContext* variables from the derived classes (Line 389, 475, 552, 572)
*Remove the code that destroys the shine array (Line 282-283)
<b>Scene.cpp</b>
*Pass the context to the Object class, and remove the code that passes the context to derived classes (Line 47-50)
<b>Graphic.h</b>
*Add the handles to the algorithm, roughness and refraction variables (Line 58-60, 131-133)
*Change the power variable in SubdividedGraphic from a FLOAT* to a FLOAT
<b>Graphic.cpp</b>
*Remove the parameter from the power() function (Line 112, 343)
*Get the addresses to the shader variables for the new handles (Line 121-123, 353-355)
*Remove the code that deletes a power array (Line 448-449)
<b>Design.cpp</b>
*Add the Lighting Documentation comments (Line 28-113)
<b>effects.fx</b>
*Overwrite the effects.fx file (take care to note that the effects.fx file is written with Solution 28 in mind, it may need modification if your solution does not support texture stages)
 
<b>Dialog.rc</b>
*Add a drop down list box with ID IDC_LIT
 
<b>WindowSettings.h</b>
*Define a macro IDC_LIT with the next available ID number
************************ Lighting Documentation v1.02 ************************
* ==========================================================================
*
* For more information on lighting, check out: http://wikicontent.gamedevgpwiki.netorg/index.php/D3DBook:Lighting(accessed May 13, 2013)
1
edit

Navigation menu