[self-interest] OpenGL (was: questions)

Steve Dekorte steve at dekorte.com
Wed Jun 11 00:07:05 UTC 2003


On Tuesday, June 10, 2003, at 12:20 PM, Jecel Assumpcao Jr wrote:
> But a problem with GL itself regarding GUIs is that it doesn't handle
> text or 2D textures very well (at least when I last looked into this)
> and needs help from some external program. Another problem is that it
> doesn't scale. See http://www.lsi.usp.br/~jecel/gmodel.html

Excellent antialiased text support isn't difficult to add using  
freetype and a bit of code to cache the rendered characters into a  
texture. Io does this, and I'm happy to share the code I use. The  
performance is as good as (and probably better than) desktop font  
renderers and the quality is much better than Self's current font  
renderer(at least on OSX). Freetype also allows use of any TrueType  
font, and there are some good free fonts out there.
For example:
http://savannah.nongnu.org/projects/freefont/

Here's the code Io uses for font rendering using GL:
http://www.iolanguage.com/Source/release/Io/IoDesktop/FreeType/base/ 
GLFont.h
http://www.iolanguage.com/Source/release/Io/IoDesktop/FreeType/base/ 
GLFont.c

Cheers,
Steve
Io, a small language: http://www.iolanguage.com/




More information about the Self-interest mailing list