Jump to content
  • Advertisement
Sign in to follow this  
stenny

Lost Device problem with D3DXFont

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

Hey there! I've got some problems with lost devices. Whenever the D3D device is lost, this code is looped through:
// given: std::vector<LPD3DXFONT>
for(UINT i=0; i<m_pFonts.size(); i++)
{
	m_pFonts->OnLostDevice();
}

Then, after the device is reset, this loop is called:
for(UINT i=0; i<m_pFonts.size(); i++)
{
	m_pFonts->OnResetDevice();
}

...and I go on with the normal gameloop. All 'prints' are drawn as they should, except for one that says "increasing". Only the last two letters 'n' and 'g' are shown. I'm guessing this has something to do with the lost device. The weird thing is that other prints, called with the exact same font, on the exact same manner, print perfectly fine! Can someone give me a direction to the source of the problem? - Stijn

Share this post


Link to post
Share on other sites
Advertisement
Post the section of code in which the error occurs, and indicate the line that doesn't work correctly.

From your description, it works before the device is lost and reset, correct?

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!