• Advertisement
Sign in to follow this  

IDirect3DDevice9::Reset

This topic is 3948 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

Hi there, I'm trying to Reset() the D3D device. The problem is that Reset fails after I create a mesh from X file (D3DXLoadMeshFromX). I create it as managed, but still Reset refuses to reset the device unless I destroy the mesh. Lookes like ID3DXMesh stores some resources in a system memory pool. Is there any way of reseting the device without destroying the mesh? Thank you

Share this post


Link to post
Share on other sites
Advertisement
You're definitely passing in D3DXMESH_MANAGED when creating?

Go have some fun with PIX - do a trace and see what state the pipeline is in immediately before the call fails; it should give you a clue as to which resources are alive and which pool they're in...

hth
Jack

Share this post


Link to post
Share on other sites
Look at this.

Lost Device DX9

It should help you with LostDevice. It helped me when I ran into the problem of LostDevice on Vista, cause its very easy if you ran windowed mode. And it explains how to handle it.

But also like if you have a vertex buffer or index buffer for example you have release it and then build it back over again and same with Meshes. You have to create the mesh again.

Share this post


Link to post
Share on other sites
I profiled with PIX and found out that when I call

D3DXLoadMeshFromX( meshFileName, D3DXMESH_MANAGED, pd3dDevice,
&pAdjacency, &pMaterials, NULL,
&numMaterials, &pMesh );

D3D allocates both VB and IB in default memory pool! SDK documentation clearly states that D3DXMESH_MANAGED forces both VB and IB to be created in managed pool. I'm a little upset about all this, anyone has any ideas?

Thank you

Share this post


Link to post
Share on other sites
I came across a couple of similar threads across the Net, seems like everyone thinks it's a bug. The most intriguing part is that D3D samples always use system memory pool to create their meshes, they only use managed pool to clone them.

Share this post


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

  • Advertisement