View Full Version : text for cross-platfrom
What is the easiest/best way to use text that can be scaled/rotated in a cross-platform opengl c++ application ? I have read Kilgard's article and it seems texture fonts are a good way to go but is that what most developers are using ? And I cannot get his code to compile (maybe just directory locations ie. /X11) thks for any help.
07-14-2004, 02:41 PM
Probably texture based fonts but it depends on the scale you're working at. As for getting Kilgard's code working, all you're doing with font rendering is drawing quads textured with a glyph that exists in a texture. The texture coordinates are determined by the glyph location in the 0-1 0-1 s & t space. You should be able to code this up yourself if you have a font texture. The difficult part is rendering the font texture using platform font resources, this can be a complex business especially if you want to support international glyphs and unicode etc. You don't need this complexity for simple stuff as you can get utilities online that will spit out a font texture for you to load from file.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.