Re: [TuxKart-devel] Slowness - really related with Karts?
Status: Alpha
Brought to you by:
sjbaker
From: Ricardo C. <ri...@ae...> - 2004-09-05 21:40:15
|
Oh, creating a texture for every character... But why not just using a pixmap format then (rather than the vectorial one - TTF)? Ricardo Em Domingo, 5 de Setembro de 2004 23:05, o James Gregory escreveu: > On Sun, 2004-09-05 at 22:00, Ricardo Cruz wrote: > > About the cache of textures, that is not practicable, since text is > > different all the time. You'd need tons of memory to cache all different > > combinations of texts. > > What I currently do is to cache TTF_Font, which already helps speeding > > it up. Though, I dunno if TTF_OpenFont() is all that expensive. > > It is possible to cache text textures. For numbers you have to do it in > parts - rather than having "9", "99" and "999", you just cache textures > for the numbers 0-9 for each font you want to draw numbers with, and > then put the textures together to create numbers, timers, etc. You also > need an individual texture for a colon (":") and "mph". > > You then have textures for "Wrong Way!", "Ready!", "Set!", "Go!", > "Congratulations!", "1st", "2nd", "3rd", etc, etc. > > I've started work but it's very boring. > > James > -- My ritual differs slightly. What I do, first thing [in the morning], is I hop into the shower stall. Then I hop right back out, because when I hopped in I landed barefoot right on top of See Threepio, a little plastic robot character from "Star Wars" whom my son, Robert, likes to pull the legs off of while he showers. Then I hop right back into the stall because our dog, Earnest, who has been alone in the basement all night building up powerful dog emotions, has come bounding and quivering into the bathroom and wants to greet me with 60 or 70 thousand playful nips, any one of which -- bear in mind that I am naked and, without my contact lenses, essentially blind -- could result in the kind of injury where you have to learn a whole new part if you want to sing the "Messiah," if you get my drift. Then I hop right back out, because Robert, with that uncanny sixth sense some children have -- you cannot teach it; they either have it or they don't -- has chosen exactly that moment to flush one of the toilets. Perhaps several of them. -- Dave Barry |