Little help here for a special ed student?
hey, i swear im an idiot. ive been trying to figure out how to display my FPS for like 3 days.... i got it to the point that i can display text.... but:
1)i cant pass a double (fps) as the text parameter in the TextOut function....
2)what is the function call to make the font transparent?
thanks!
let me be an idiot no more@!
i code therefore i am.
quote:Original post by Neen10do
1)i cant pass a double (fps) as the text parameter in the TextOut function....
2)what is the function call to make the font transparent?
1) Why don''t you use a float instead of a double ?
2) If you''re using the CD3DFont then just change the alpha value of it''s color...
KaMiKaZe
Kamikaze, what are you smoking? TextOut doesn''t take a float OR a double.
Neen, in order to print out a float, you''ll first have to write its value into a character string. The function that will help you do that is sprintf(); read up on it.
Don''t listen to me. I''ve had too much coffee.
Neen, in order to print out a float, you''ll first have to write its value into a character string. The function that will help you do that is sprintf(); read up on it.
Don''t listen to me. I''ve had too much coffee.
u can do something like this
char buf[20];
sprintf(buf,"fps: %0.2f",fpsvalue);
font->TextOut(buf,....)
char buf[20];
sprintf(buf,"fps: %0.2f",fpsvalue);
font->TextOut(buf,....)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement