Friday, December 4, 2009

Text Centering

More on text rendering! The most exciting part of game development! (not!) So I've created basic text centering. It uses the same method of scanning ahead on the fly to determine line breaks and line width, then creates an offset every line.

I intend to write a class that can prepare blocks of text for rendering given a maximum width and height. This will greatly speed up the text rendering functions and will also allow for special sizing of GUI objects that rely on the final rendered text width and height to size themselves. (Like the Speech Bubbles for instance).



No comments:

Post a Comment