• Advertisement
Sign in to follow this  

State block

This topic is 4005 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am just wondering why the fill mode will be set to "solid" mode despite I have set it to wireframe mode and saved it in a state block. Ok here's my code: // Begin recording device-state block m_pD3DDevice->BeginStateBlock(); // Set render state to wireframe mode m_pD3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); // Enable specular highlights m_pD3DDevice->SetRenderState(D3DRS_SPECULARENABLE, TRUE); // Disable backface culling m_pD3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); // Enable z-buffering m_pD3DDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE); // Stop recording device-state block m_pD3DDevice->EndStateBlock(&m_pD3DStateBlock); // Enable culling m_pD3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); // Capture the device state changes m_pD3DStateBlock->Capture(); Now when I apply the saved state block to the device it's fill mode will be set to solid fill mode. Why? And will "Capture" continue to capture the device states even after it has been called or will it just capture the device state changes just before it is called? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement