   Lost device woes (D3D9)
  I'm trying to handle a lost device. I come from an OpenGL background so this is my first crack at it.After the reset is performed, nothing is drawn to the screen, all black. That's basically my problem.The code is flowing fine through the process as outlined by several tutorials, books, and the DXUT functions that I've used as a reference. In fact, d3dDevice->Reset() returns D3D_OK and then I resume the normal render loop without any problems... calls to d3dDevice->Present all succeed after that. Just nothing is drawn.So what am I missing? Do I need to re-create the device after Resetting it? Do I need to re-create the camera? Not sure where to go from here. Any help is appreciated. What do I have to do after Reset besides re-creating my volatile resources (of which there are none right now)?   
  When the device is reset, every setting on it should be considered "uninitialized". That is, you need to set every value again. This is mostly an issue with the settings you normally set at application start, since other settings get set every frame anyways.In addition, make sure all calls (other than reset) are also succeeding. If you forgot to release/recreate an object, reset might succeed but attempts to use the resource might fail.Lastly, reset is sometimes a difficult method to call correctly. Some drivers will just outright fail when you do something they don't like. While I'm confident the situation is better than it used to be, you might still run into issues on specific hardware. If you're not using D3DX extensively, the difference in code between calling Reset and Release/Create on the device should be minor, so you could compare the results of the two to help identify issues.   ;Quote:Original post by sirobevery setting on it should be considered "uninitialized"sirob you are the man. That was the clue I needed and now it's "fixed". I basically took everything from my initialization after creating the device and re-initialized it in my initVolatileResources() function called after Reset succeeds. It was basically just a bunch of calls to SetRenderState(...) that set up my initial render state.It reeeeally would have helped if that little snippet of information was anywhere in the DX documentation, but if it is I certainly didn't find it, for something so simple as adding one sentence to the docs it could have saved me a lot of time. I simply didn't think that the render state would have been invalidated because all they ever talk about are your "D3DPOOL_DEFAULT" resources and the few other things being lost.Anyway, thanks.;  I agree it could be a little more explicit. From the Documentation:Quote:Calling IDirect3DDevice9::Reset causes all texture memory surfaces to be lost, managed textures to be flushed from video memory, and all state information to be lost.;  hmm yeah I missed that one, scanned right by it I'm sure. They could bold it or something.   