D3D封裝了很多繪製狀態,,它們將影響幾何體的繪製方式。
HRESULT IDirect3DDevice9 :: SetRenderState(
D3DRENDERSTATETYPE State,
DWORD Value
);
例如:Device->SetRenderState(D3DRS_DESTBLEND, D3DFILL_WIREFRAME);
設置線圓填充模式,其簽名是:HRESULT SetRenderState( D3DRENDERSTATETYPE State, DWORD Value);兩個參數是對應的,填了第一個參數,第二個參數就應該填對應的。
State
[in] Device state variable that is being modified. This parameter can be any member of the D3DRENDERSTATETYPE enumerated type.
Value
[in] New value for the device render state to be set. The meaning of this parameter is dependent on the value specified for State. For example, if State were D3DRS_SHADEMODE, the second parameter would be one member of the D3DSHADEMODE enumerated type.