Jump to content
  • Advertisement
Sign in to follow this  
ttom

D3DXCreateFontIndirect

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

Dear all: When i use the D3DXCreateFontIndirect or D3DXCreateFont in WinMe system,it always fall. Everyone know about it,Please tell me. thanks ttom

Share this post


Link to post
Share on other sites
Advertisement
There are 2 reasons why D3DXCreateFontIndirect might be failing, one is that you are running out of memory, and there is not enough left to create the font object. The other is that one of the parameters passed to the function is invalid.

You can find out which it is like so:


HRESULT hr = D3DXCreateFontIndirect(...);
if(FAILED(hr))
{
if(hr == D3DERR_INVALIDCALL)
{
// A parameter may have an invalid value.
}

if(hr == E_OUTOFMEMORY)
{
// Direct3D couldnt allocate sufficient memory to
// complete the call
}
}



Once you know what the error is, you will have a better idea how to fix it.

Share this post


Link to post
Share on other sites
Thanks to all reply this question.
When I ues the D3DXCreateFontIndirect or D3DXCreateFont,
it fail and it show "D3DERR_INVALIDCALL". So i change the
every parameter , it is the same. i don't have any idea.
ps. i use the vs2003 and dx9.0b in winxp sp2 for develop and
test and the win me.
ttom

Share this post


Link to post
Share on other sites
Quote:
Original post by Mosh
There are 2 reasons why D3DXCreateFontIndirect might be failing, one is that you are running out of memory, and there is not enough left to create the font object. The other is that one of the parameters passed to the function is invalid.

Keep in mind that functions aren't limited to returning the values listed in their documentation page. They can and do return other values (Though you compare against specific errors inside a FAILED() block, so it's relatively Ok).

The best thing to do here is link to the debug version of D3DX (d3dx9d.lib) and check the debug output.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!