D3D基礎之繪製狀態

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.

發佈了136 篇原創文章 · 獲贊 25 · 訪問量 18萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章