[osg-users] ANN: osgPango (alpha)

Jason Beverage jasonbeverage at gmail.com
Fri Sep 12 09:50:50 PDT 2008


Hi Jeremy,

Looking great so far, keep the cool NodeKits coming:)

Jason

On Fri, Sep 12, 2008 at 12:34 PM, Jeremy Moles <jeremy at emperorlinux.com>wrote:

> Hello folks!
>
> I'd like to quickly post a message here about (another! yikes!) NodeKit
> I'm working on that ties closely with osgWidget and my original
> intentions a year ago when I started working on osgWidget in my free
> time. :)
>
> I've created a NodeKit that harnesses the power of the Pango engine
> (it's used widely in Linux and works in Windows and Mac, leveraging the
> power of Clearfont and ATSUI, respectively) for creating 2D text in
> OpenGL. It caches glyphs internally using the osgCairo nodekit (another
> one of mine) so that it can quickly create groups of quads to form a
> string of UTF-8 text on the fly.
>
> Furthermore, I plan on creating two objects in osgPango:
>
>        osgPango::Label
>        osgPango::Input
>
> ...that can be optionally built and will inherit from osgWidget::Widget,
> so as to be used interchangeably with osgWidget (and adhering to the
> existing API so that all that is required is a simple typedef).
>
>
>
> --------------------------------------------------------------------
>
> The main purposes of this NodeKit are:
>
>        1. To provide nothing less than superb 2D font support for OSG
> applications that need to use lots of text in an orthographic
> perspective.
>
>        2. To caches all glyphs internally in OSG textures so that only the
> first creation of a glyph requires any significant CPU time; all
> subsequent use of the character is simply texturing a quad.
>
>        3. To support all layout options provided by Pango (text justify,
> etc.)
>
>        4. To ensure that all quads are pixel-aligned, for maximum clarity.
>
>        5. Pad all glyphs iternally with one pixel of blank space so that
> scaled text in OpenGL blends properly without unsightly anomalies.
>
>        6. Finally, to provide a clean and simple API for accessing every
> piece
> of information necessary to create complicated objects such as input
> widgets and the like.
>
> --------------------------------------------------------------------
>
>
>
> Keep in mind that just because osgPango is optimized for 2D display
> constraints, this doesn't mean you can't throw an osgPango::Text object
> (which is just a Geode) into a normal perspective projection (a-la
> nameplates above character's names, etc.)
>
> I'm mainly posting this to solicit feedback and generate interest from
> others who need high-quality font support in OSG. This isn't intended as
> a replacement for osgText, but perhaps will demonstrate what is
> "possible" to one day do with osgText.
>
> http://osgpango.googlecode.com
>
> I've got some screenshots there on the Googlecode site, so don't be
> shy. :) I'm particularly proud of the outline support, which you'll see
> is very high-quality. It's currently implemented as TexEnvCombine
> (thanks Cedric!), but I will have a GLSL implementation soon. Check out
> the justify screenshot, too...
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080912/70090a58/attachment-0003.htm>


More information about the osg-users mailing list