que parece que la API de D3D11 es un poco torpe, o yo no lo estoy usando derecha.Cambio de un solo ajuste en estado D3D11
¿Es cierto que este es el conjunto mínimo de pasos para cambiar un estado único de trama en D3D11 (estoy usando el cambio de la prestación modo alámbrico como un ejemplo)
// 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
Parece mucho más tiempo que el 9 de
cd3d->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME) ;
no se olvide de liberar la instancia Rstate después de llamar RSSetState para evitar una pérdida de memoria. – mchiasson