似乎D3D11的api有点笨重,或者我没有正确使用它.
这是否是在D3D11中更改单个光栅化器状态的最小步骤集(我将使用更改为线框模式渲染作为示例)
// variables to hold the current rasterizer state and its description ID3D11RasterizerState * rState ; D3D11_RASTERIZER_DESC rDesc ; // cd3d is the ID3D11DeviceContext cd3d->RSGetState( &rState ) ; // retrieve the current state rState->GetDesc( &rDesc ) ; // get the desc of the state rDesc.FillMode = D3D11_FILL_WIREFRAME ; // change the ONE setting // create a whole new rasterizer state // d3d is the ID3D11Device d3d->CreateRasterizerState( &rDesc, &rState ) ; cd3d->RSSetState( rState ); // set the new rasterizer state
似乎比9年代长很多
cd3d->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME ) ;
| 归档时间: |
|
| 查看次数: |
3278 次 |
| 最近记录: |