Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: Quality and Speed on Font rendering

  1. #1
    Intern Contributor
    Join Date
    Dec 2001
    Location
    Porto Velho
    Posts
    98

    Quality and Speed on Font rendering

    Hello,

    I finished a abstract code to render a "console" like quake, counter strike, unreal and etc. But whats the best way to render fonts on opengl? I tested:

    texture map: faster then bitmapping, slow with a lot of char and very poor quality.

    bitmap: use windows fonts, slow... very slow

  2. #2
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    486

    Re: Quality and Speed on Font rendering

    Texture mapped fonts can be very high-quality if used and implemented correctly.

  3. #3
    Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    354

    Re: Quality and Speed on Font rendering

    texture map fonts is the way to go IMO.

    Did you try FTGL? It's based on the freetype lib, and offers high quality glyphs. (Side note : Warcraft3 uses freetype (and it has quite a lot of text to display)).

  4. #4
    Intern Contributor
    Join Date
    Dec 2001
    Location
    Porto Velho
    Posts
    98

    Re: Quality and Speed on Font rendering

    Texture mapped fonts can be very high-quality, yes. But the size of textures must be very high too. This very far from a commercial-quality development.

  5. #5
    Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    354

    Re: Quality and Speed on Font rendering

    This very far from a commercial-quality development.
    I pointed out that texture mapped fonts are used by Warcraft 3 : its a commercial game, sold millions of copies all over the world; its development took several *years*.

  6. #6
    Intern Contributor
    Join Date
    Dec 2001
    Location
    Porto Velho
    Posts
    98

    Re: Quality and Speed on Font rendering

    When I wrote "commercial-quality" I mean softwares that need a very high performance(GIS, etc), warcraft3 its just a PC game(very good game), I read some docs on opengl.org, writing fonts on video board framebuffer directly its faster than any other method.

    note that warcraft3 uses both texture mapped and bit mapped font rendering, freetype just loads glyphs, adjust kerning, etc

    Thanks

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    612

    Re: Quality and Speed on Font rendering

    The size of the texture shouldn't be that high, the charactes should be almost as big on the texture ans they are shown on the screen, that makes the best quality..
    http://mazy.annat.nu/files/Applications/Fonture/ if you want to make textures

  8. #8
    Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    354

    Re: Quality and Speed on Font rendering

    writing fonts on video board framebuffer directly its faster than any other method.
    The only way I know to write "directly" in the framebuffer with OpenGL is glDrawPixels. And this method is slow. Search the forum, you'll see plenty of posts complaining about glRead/glDrawPixels being slow. The reason why glDrawPixels is slow is that it reads data from client memory each time it is called. If you create a font texture, chances are that this texture will be resident in host memory, and access will be significantly faster.

    Note about games : IMHO, producing a game that must run at decent framerate on the latest P4 3GHz w/ GF4 and an old machine like a P3 600MHz w/ a crappy video controler is a challenge. Well-coded games (I think W3 is one of them) are *extremely* optimized : the more computers able to run the soft, the more potential customers.

    Back to your question : I still think that texture mapped font are better than blitting your glyphs directly. IMHO, you should try both, time each method, and see what best fits your needs.

    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •