Fast Font Engines
Im using GDI''s font stuff for my little demos, but I read that for a real-time game, you MUST create your own font engine instead of using GDI''s due to speed. Any suggestions on how to start?
that is absolutely true. when i switched from GDI to my own font drawing, i got a speed increase of 300%, and i was only using GDI to display the framerate!
my font engine is pretty simple. i have one offscreen surface that contains all characters, and i have an array with the information where in the bitmap a letter is.
then i just draw the chars one after another
my font engine is pretty simple. i have one offscreen surface that contains all characters, and i have an array with the information where in the bitmap a letter is.
then i just draw the chars one after another
I load all the characters into sepereate offscreen surfaces, I find it faster - you only have to use one source rect [no lookups, etc].
wouldn''t that introduce a lot of unnecessary overhead? having separate surfaces, that is. i''m guessing that there''s a lot more information per surface than per RECT. that''s just my opinion, don''t feel obligated to act upon it. however implemented, it definitely is faster than GDI.
cheers,
crazy166
some people think i'm crazy, some people know it
cheers,
crazy166
some people think i'm crazy, some people know it
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement