Archived

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

billybob

drawtext isn't working

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