Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Should I release LPD3DXMESH on lost device?

This topic is 4237 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'm using D3DXCreateSphere to create a LPD3DXMESH, am i supposed to release and recreate it on a lost device? And if so, is there a way to set its pool to D3DPOOL_MANAGED so i dont have to recreate it on the lost device? thx

Share this post


Link to post
Share on other sites
Advertisement
You need to call ID3DXMesh::OnLostDevice() when the device is first lost, and ID3DXMesh::OnResetDevice() after you've reset the device.

To set a mesh to use the Managed Pool, use the D3DXMESH_IB_MANAGED and D3DXMESH_VB_MANAGED flags when creating it. You still need to call OnLostDevice and OnResetDevice though.

All this info is in the DX SDK Documentation under ID3DXMesh.

Share this post


Link to post
Share on other sites
you're right, meshes don't have those methods. You'll need to release and recreate or use Managed Pool meshes.
Sorry for the confusion.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!