Jump to content
  • Advertisement
Sign in to follow this  
oldskoolPunk

D3DXFONT on Win98

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

After much help from you guys I think I now have a fair understanding of D3DXFONT's. Thanks everybody for helping! But now I have another question. After getting everything to work on my XP machine, I tried this on my Win98 machine and it segment faults. After doing a little error checking, it seems that CreateFont does not fill D3DXFONT font with anything, it is still NULL after the call. So when it reaches the DrawText line it segment faults. here is a copy of the 3 lines from the Win98 machine... LPD3DXFONT font = NULL; D3DXCreateFont ( device, height, width, 100, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DRAFT_QUALITY, DEFAULT_PITCH | FF_DONT_CARE, "Ariel", &font); if (font=NULL) return; // it returns here. When commented out, // the next line will segment fault. font->DrawText( NULL, str.c_str(), (int)str.size(), &rct, //this is set DT_NOCLIP, fontColor); //this is set

Share this post


Link to post
Share on other sites
Advertisement
The following quote taken from MSDN Center could explain why you're having trouble, although I can't confirm that...

"The latest version of the DirectX SDK is now available. New features in this release include updated libraries to support the initial release of Windows Vista, In addition, several new samples and articles have been added. NOTE: Starting with the December 2006 SDK, DirectX no longer supports the targeting of applications for Windows 95, Windows 98, Windows 98 SE, or Windows ME. "

Share this post


Link to post
Share on other sites
xyzzy00
I think you are right, I might have misspelled in when typing it into the post. But regardless of the spelling, it will revert to the standard font, even if I use "xyzzy00" as the font :)

devronious
This is also correct. I read this before downloading, expecting nothing at all to work on the Win98 machine. But, I have created a window, a d3d pointer and a d3d device. I am able to load and display .x meshes, and I am able to use D3DXMATRIX and other stuff from the D3DX9 lib. Looking in d3dxcore, i cannot find anything that is OS specific to do with D3DXFONT. I was hoping someone else had run into the same problem and found a fix. I will continue to look at the .h file and try some more stuff tonight.

Thanks for the replies.

Share this post


Link to post
Share on other sites
Quote:
Original post by oldskoolPunk
xyzzy00
I think you are right, I might have misspelled in when typing it into the post. But regardless of the spelling, it will revert to the standard font, even if I use "xyzzy00" as the font :)

devronious
This is also correct. I read this before downloading, expecting nothing at all to work on the Win98 machine. But, I have created a window, a d3d pointer and a d3d device. I am able to load and display .x meshes, and I am able to use D3DXMATRIX and other stuff from the D3DX9 lib. Looking in d3dxcore, i cannot find anything that is OS specific to do with D3DXFONT. I was hoping someone else had run into the same problem and found a fix. I will continue to look at the .h file and try some more stuff tonight.

Thanks for the replies.


When the DirectX SDK says it is "not supported", it doesn't mean that it will suddenly no longer work on Win98. It's just that it is no longer guaranteed to work on Win98.

Share this post


Link to post
Share on other sites
The most obvious thing to do would be to listen to D3D when it says something went wrong.

What's the return value from D3DXCreateFont()?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!