Hey Mike I got a quick question from what i read in your book...do you REALLY use the gdi function TextOut for displaying text in games?? I have always heard that it is bad to use that... I may have misunderstood you though so could you clarify it?
TextOut??
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
Yeah I used TextOut - but I drew the fonts to a cached bitmap only once during initialization, and composed the screen from the predrawn bitmaps with text.
TextOut is slower than drawing it with a pencil and hand carrying it from Texas to New York.
This is cool because it keeps you from having to create a bitmap font, which is a real pain in the ass and very expensive.Mr.Mike
Author, Programmer, Brewer, Patriot -
If you want to save yourself some trouble, you can use the Direct3DX Font class to draw your text. It's very customizable, and seems to be very fast.
-
I'd be curious as to just how fast it is - have you done and performace measurements on Direct3DX's fonts? I mean - changing the text and seeing how fast it redraws...Mr.Mike
Author, Programmer, Brewer, Patriot -
I haven't done anything official in the ways of benchmarking, but when I added text my app there wasn't any measureable drop in the frame-draw time. Although, the .NET timer only has a 15ms resolution
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0