में एक एकल सेटिंग सेटिंग बदलना ऐसा लगता है कि D3D11 की एपीआई थोड़ा उलझन में है, या मैं इसका सही उपयोग नहीं कर रहा हूं।D3D11
यह सच है कि इस D3D11 में एक भी रास्टेराइज़र राज्य (मैं एक उदाहरण के रूप wireframe मोड प्रतिपादन करने के लिए परिवर्तन का उपयोग कर रहा) बदलने के लिए कदम की न्यूनतम सेट है
// 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) ;
मेमोरी लीक से बचने के लिए आरएसएससेटस्टेट को कॉल करने के बाद अपने आरएसटीएटी इंस्टेंस को रिलीज़ करना न भूलें। – mchiasson