Jump to content
  • Advertisement

Archived

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

Esap1

Simple DDraw Font Thingy

This topic is 6928 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 need a simple function to output the FPS, I thought there was a DrawDebugText, is that fast enough, and does anyone know of a tutorial on writing a font engine, because onece I make a console Ill probally need my own font engine. Thanks A LOT!

Share this post


Link to post
Share on other sites
Advertisement
Yeah, I''d like a font engine too, although I''ve seen many easy to implement ones, I don''t won''t to slow it down any with windows Device Contexts. Is there a way to do this without DC''s? Or are DC''s plenty fast enough?
Thanks,
Ben

Share this post


Link to post
Share on other sites
Well.... I can''t give you my font engine code, but I would, except this ain''t my PC and it hasn''t got any code on it because it isn''t mine. I''m using it because my internet connection on MY PC decided to die on me....
HOWEVER I can tell you how to do it, so you can QUICKLY + SIMPLY (avoiding all the pitholes I fell into ).
So. First, declare a struct along the lines of:
int length;
int totallength;
then, have a function (in a class if you prefer) like this:
NOTE: here IDirectDraw7* Draw, is assumed declared along with IDirectSurface7* Letters, and LetterStruct Sizes;
void CreateFont(char* FontName,int Size,int Start,int End,DWORD TransColor) {\

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!