LPDIRECT3DDEVICE9->Reset() doing strange things.

Started by
14 comments, last by Teric 19 years, 11 months ago
quote:Original post by Teric
Thanks for the info, Hyena. Just to be sure--what would those ''extra bits'' be? Directories? Leftover files? Registry Entries? I want to make sure I do this right.


Generally you just have to make sure the directory was properly cleaned up. Also check the Add/Remove Programs dialog to see if it still thinks any SDKs are installed. This can happen if you''ve previously installed over older versions.

Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena
Advertisement
quote:Original post by Teric
I downloaded the DirectX control panel applet, and I can bring it up now, but...


Where do you get this from? i also don''t have the icon in my control panel, thanks.
Follow Drunken Hyena''s instructions above--they worked perfectly for me. I don''t recommend downloading the directx control panel applet; it caused problems for me. Though, if you really want it, you can google for it (that''s what I did).

Hyena--BINGO. That did the trick. Now I can turn on full debugging info for D3D. I ran my program in debug mode, and performed the resolution change, then looked at the debug output. Here are the relevant output lines:

Direct3D9: (ERROR) :All user created stateblocks must be freed before Reset can succeed. Reset Fails.
Direct3D9: (ERROR) :Reset failed and Reset/TestCooperativeLevel/Release are the only legal APIs to be called subsequently

I haven''t created any user-defined state blocks. Any idea what this could mean? Does it mean I haven''t released all of my textures from video memory?

Thanks again! Now I feel like I''m getting somewhere.
I am always open to feedback, positive or negative...
quote:Original post by Teric
I haven''t created any user-defined state blocks. Any idea what this could mean? Does it mean I haven''t released all of my textures from video memory?


That probably is the case, i was trying to use reset in my game... and it wouldn''t work until i freed all my vertex buffers/index buffers/textures buffers/etc... bit of a pain, cause you have to re-create them all after the rest...
Some D3DX interfaces create state blocks, so you have to call their OnLostDevice (something like that, don't have docs handy) so they free up their internal resources and then a similar function when the device has been reset. I believe both D3DXFont and D3DXSprite do this, others may as well.


Stay Casual,

Ken
Drunken Hyena

[edited by - DrunkenHyena on June 3, 2004 5:02:38 PM]
Stay Casual,KenDrunken Hyena
That was it!!! I had a D3DXFont object that I hadn''t released. Once I released it, the reset worked perfectly.

Thank you so much, Hyena!
I am always open to feedback, positive or negative...

This topic is closed to new replies.

Advertisement