Jump to content
  • Advertisement


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


drawtext isn't working

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

i''m getting this expected HDC___ thing for the first argument. the docs don''t help me, what is it? i tried char, char *, unsigned char, no luck. i think its supposed to be declared like a texture, but with a different thing for texture. the examples are useless becuase of that whole common file garbage, makes it impossible to find anything without tracing through 5 files and 20 dead ends

Share this post

Link to post
Share on other sites
The docs are generally pretty clear. What interface are you using? D3DXFont? CD3DFont? Neither one of those takes an HDC. Can you post a snippet of code showing your call to drawtext?

Stay Casual,

Drunken Hyena

Share this post

Link to post
Share on other sites
drunkenHyena, hey! your tutorials are great! helped me a lot, number 7 got be up and running with directx in the first place, thanks. here is the code, using D3DXFont:

fpsChar = char(elapsedT);
DrawText(&fpsChar, strlen(&fpsChar), &debugRect, DT_LEFT ,D3DCOLOR_ARGB(255, 255, 255, 255));

i know its wrong, it was a measly attempt at understanding the docs. debugRect is the top left corner of the screen, and i just wanted to make sure it would show up, thats why its white. i''ll change it later.

do i need to do other things before using this? it seems that dx makes everything more complicated than it has to be, i mean, its just text for cryin out loud!

elapsedT is the timing variable in the game, so at this moment, it won''t tell you the fps, rather this number which i''m not sure how many times it ticks per second (you wouldn''t happen to know how many times timeGetTime() ticks per second would you? thats what i need to find the fps, not the timing variable)

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!