enable/disable specular highlights appropriately

This commit is contained in:
David Rose 2005-07-23 14:28:21 +00:00
parent 8e5cf2bb6f
commit 23ea377b13

View File

@ -2183,13 +2183,19 @@ do_issue_material() {
} }
} }
_d3d_device->SetMaterial(&cur_material); if (material->has_specular()) {
_d3d_device->SetRenderState(D3DRS_SPECULARENABLE, TRUE);
} else {
_d3d_device->SetRenderState(D3DRS_SPECULARENABLE, FALSE);
}
if (material->get_local()) { if (material->get_local()) {
_d3d_device->SetRenderState(D3DRS_LOCALVIEWER, TRUE); _d3d_device->SetRenderState(D3DRS_LOCALVIEWER, TRUE);
} else { } else {
_d3d_device->SetRenderState(D3DRS_LOCALVIEWER, FALSE); _d3d_device->SetRenderState(D3DRS_LOCALVIEWER, FALSE);
} }
_d3d_device->SetMaterial(&cur_material);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////