mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
enable/disable specular highlights appropriately
This commit is contained in:
parent
8e5cf2bb6f
commit
23ea377b13
@ -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()) {
|
||||
_d3d_device->SetRenderState(D3DRS_LOCALVIEWER, TRUE);
|
||||
} else {
|
||||
_d3d_device->SetRenderState(D3DRS_LOCALVIEWER, FALSE);
|
||||
}
|
||||
|
||||
_d3d_device->SetMaterial(&cur_material);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user