This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Font performace in game loop?


Font performace in game loop?

Postby draklava » Sep 30, 2002 @ 4:00pm

User avatar
draklava
pm Member
 
Posts: 79
Joined: May 15, 2002 @ 6:13am
Location: Atlanta, Albania, Wherever


font performance

Postby Conan » Sep 30, 2002 @ 8:03pm

I did some work at the weekend on a menu system and noticed quite a big difference between creating a font and displaying 10 text strings as against calling a function which created the font each time it drew the text string. The font create part seems to be very heavy. Unless you want to change font attributes you should only create a font once if you can manage.

You will see in the new rotate demo in 0.6 that Kzinti uses a simple and fast method of getting the FPS counter. Much quicker than using a real font but of course without all the fancy things you can add.

I will update the font chapter to add in the missing line.

( re: the font article, I was always really annoyed at how Windows font examples in books made it look really difficult to handle fonts so I sat down & peeled it back to basics. Glad to be of help )

Just checked, I do have
m_background->ReleaseDC( hDC );
but that only works if the rest of the code is used as is. I will update to make things clearer. 
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron