Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Text Rendering

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

What function should i use for rendering a text in a DirectX Window?? i have tried "DrawText" but the compiler gives me this error: "unresolved external symbol". What can i do? Thanks

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
and it''s a linker error not a compiler error...


Share this post

Link to post
Share on other sites
DrawText is a GDI function anyway so you probably dont want to use it in a DX app.

/* Ignorance is bliss, then you go and spoil it by learning stuff */

Share this post

Link to post
Share on other sites
Look at the way I use it in my DirectDraw wrapper, in this page of my site. Sure it''s very slow compared to the usual blittings, as you need to lock the memory for using GDI functions (it''s done automatically when you use GetDC), but if you keep updating your text just once every some frames, it''s ok.

The next update of that wrapper (that''s coming soon, if you want to be notified by mail when it''s ready just join my site''s newsletter) will include a very interesting console class I''m developing for my current game proyect, and after testing it a lot I can tell you GDI works real well and doesn''t lower your game''s speed unless you use it very heavily (for example, once or twice a frame). In that console code, it''s only used when a new key is pressed, for updating the latest line of the scrolling text.

Some time ago I worked for a big commercial proyect which used GDI text APIs for making animated texts with special effects, and it was real worth the loss of speed.

Take a try, and if you see it''s not as fast as you''d want, go make your own fonts classes (isn''t hard, but takes a lot of time to do, and time is never enough, you know it).

Best regards,

--H. Hernán Moraldo
Sign up to the HHM''s developers'' newsletter.

Share this post

Link to post
Share on other sites

  • 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!