Sign in to follow this  

State block

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this