One of the big problems OpenGL runs into after you’ve got your first few polygons flying around the screen is the lack of a standard method for generating text within the API. A few techniques have evolved to tackle the problem: Pre-generated string textures The simplest and fastest method, a texture is pre-built for each piece of text that needs to be displayed. This is quick to render at run time, but isn’t very flexible or efficient. Polygon glyphs created from outline font definitions This method produces high quality, scalable text, but this is also the slowest approach due to the overhead of generating and rendering the glyph polygons. WGL and GLUT extensions These extensions do a great job of text rendering. However, these libraries are not universally available on all systems and I have a bad habit of trying to be portable and platform independent. Bitmapped fonts Bitmap fonts are fast, flexible and platform independent. However, there are some limitations: Quality suffers when scaling up the texture and the number of possible characters in a font bitmap is limited. Extended or Unicode character sets with accents or non-latin symbols are not well supported. Create Unicode bitmap font for LCD / LED. BitFontCreator Pro is a professional bitmap font creator tool for Windows, which allows you to create and modify monochrome 1-bpp bitmap fonts that can be used in Windows and electronic devices (such as Mobil, phone, DVD player and any other LCD / LED). Codehead’s Bitmap Font Generator (CBFG) is now at version 1.45 and supports the following features: DIB rendering of font gives best font output. I originally conceived this idea after trying to modify one of Scraggle’s Bitmap Fonts to [] Warriors of the Cucumber. Bitmap Font Creator. Codehead’s Bitmap Font Generator (CBFG) is now at version 1.45 and supports the following features: DIB rendering of font gives best font output. A bitmapped font is simply an atlas texture containing a collection of glyphs and symbols. (Note: the purple lines are a visual aid, they do not appear on the actual texture.) The grid layout means that the calculation required to select any given character is quick and simple. The area containing the selected characters can then be mapped onto a series of polygons to create dynamic strings of text. Adding width information to the glyphs allows the textured quads to be overlapped to create better looking text with variable character widths. There are quite a few bitmap font generators around, but I couldn’t find one that provided all the features I wanted. So I wrote my own.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |