Skip to main content
GameDev.net gamedev.net
🔒 Locked

Lost Device problem with D3DXFont

Started by stenny Jul 20, 2008 at 4:47 PM 0 replies 1k views
Original Post
stenny
stenny
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
What do I expect? A young man's quest to defeat an evil sorceror while discovering the truth of his origins. A plucky youngster attended by her brutish guardian. A powerful artifact which has been broken into a small number of artifactlets distributed around the world.What do I want? Fewer damn cliches. - Sneftel
Buckeye
Buckeye
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?
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.