Robin Mélinand wrote:

However, OpenGL has its limitations when it comes to display some images with numerous sharp discontinuities, like texts or vector graphics. Every OpenGL newbie knows that displaying a few words in OpenGL is not trivial, and the solutions used are often sub-optimal. Among these, I'm aware of two solutions. The first one is to use a font texture, which is a bitmap representation that does not scale well when zooming. The second one is to do a piecewise linearisation of the glyph curves and display it as a set of polygones, but this has the drawback of artificially increasing the vertex workload. Furthermore, with these techniques, anti-aliasing is either impractical or costly. It is however very important feature for a proper font display.

Which are exactly the problems faced by any font renderer,
including those currently used by various implementations of
X Windows. It only looks more difficult in OpenGL because the
API deliberately does not include a font rendering API (as a
cross platform API, it wasn't practical to try and unify Mac,
MS Windows, and X Windows fonts.)

From the OGD perspective, font rendering is Somebody Elses
Problem. The Xgl people have already worked out how to use
font textures, piecewise linearisation with anti-aliasing,
etc. (In the worst case, they can use the existing 2D font
renderer to a pixmap and copy the pixels straight to the
buffer with OpenGL glImage2D.) Provided the OGD implements
OpenGL correctly, all the Xgl stuff will just work.


Yes and no, since appearently Xgl uses Vector Texture Maps via shaders to implement font rendering efficiently. This solution will be impractical on OGD since, as you said, OGD will not be a programmable GPU. A fallback will be probably be used instead. I think it would be interensting to know why the Xgl guys bothered to implement the Vector Texture Maps.

Xgl must have a fallback already, because the vector texture
maps won't work on anything before (I think) an nVidia 6xxxx
or the equivalent ATI card with Pixel Shader 3 capabilities.
As to why Xgl uses them, font rendering is as you've pointed
out a CPU intensive task well worth offloading to the GPU.

--
        Hugh Fisher
        DCS, ANU

_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to