Changes

Jump to: navigation, search

GAM670/DPS905 Weekly Schedule 20121

528 bytes added, 18:57, 14 February 2012
This Week
Matrix projection; // projection transformation
</pre>
:: APIDisplay.cpp- setup()
<pre>
// points to compiled shader code
d3dd->SetVertexShader(vertexShader);
</pre>
:: APIDisplay.cpp - setProjection()
<pre>
this->projection = *((Matrix*)projection);
</pre>
:: APIDisplay.cpp - beginDrawFrame()
<pre>
Matrix& v = *((Matrix*)view);
uniformVS->SetInt(d3dd, "noLights", 4);
</pre>
:: APIDisplay.cpp - set()
<pre>
uniformVS->SetBool(d3dd, "lighting", b);
</pre>
:: APIDisplay.cpp - setWorld()
<pre>
uniformVS->SetMatrix(d3dd, "world", (D3DXMATRIX*)world);
</pre>
:: APIDisplay.cpp - setReflectivity()
<pre>
uniformVS->SetFloatArray(d3dd, "material.ambient", (FLOAT*)&r.ambient, 4);
uniformVS->SetFloat (d3dd, "material.power", (FLOAT)r.power);
</pre>
:: APIDisplay.cpp - release()
<pre>
// release the shader COM objects
}
</pre>
:: APILight.cpp - setup()
<pre>
// Populate the vertex shader constant table
rc = true;
</pre>
:: APILight.cpp - turnOn()
<pre>
char constantLightOn[] = "lightOn[0]";
uniformVS->SetBool(d3dd, constantLightOn, true);
</pre>
:: APILight.cpp - update()
<pre>
char constantLightOn[] = "lightOn[0]";
uniformVS->SetBool(d3dd, constantLightOn, true);
</pre>
:: APILight.cpp - turnOff()
<pre>
char constantLightOn[] = "lightOn[0]";
uniformVS->SetBool(d3dd, constantLightOn, false);
</pre>
:: APIGraphic.h - class APIXMesh
<pre>
D3DXCOLOR* ambient;
FLOAT* power;
</pre>
:: APIGraphic.cpp - APIXMesh()
<pre>
ambient = nullptr;
power = nullptr;
</pre>
:: APIGraphic.cpp - APIXMesh()
<pre>
ambient = nullptr;
power = nullptr;
</pre>
:: APIGraphic.cpp - operator=()
<pre>
if (ambient)
}
</pre>
:: APIGraphic.cpp - setup()
<pre>
ambient = new D3DXCOLOR[nSubsets];
power[i] = matl[i].MatD3D.Power; // 0 if it shouldn't be shiny
</pre>
:: APIGraphic.cpp - draw()
<pre>
uniformVS->SetFloatArray(d3dd, "material.ambient", (FLOAT*)&ambient[i], 4);
uniformVS->SetFloat(d3dd, "material.power", (FLOAT)power[i]);
</pre>
:: APIGraphic.cpp - suspend()
<pre>
if (ambient)

Navigation menu