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 3 of 3

Thread: Optimizing offscreen 2D text rendering.

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Posts
    5

    Optimizing offscreen 2D text rendering.

    Greetings,

    I am using the FTGL wrapper to freetype to render text on an offscreen image. The text needs to have an outline so I render each string offset by one pixel in each direction to represent the outline, and then I render the string with the actual color in the middle. It works great, however, I need to be able to render 100 strings (with outline) in under .10 secs on a low end machine (400 MHz with equally crappy video card).

    I'm thinking there must be a better way to render the outline without actually calling FTGL multiple times for each string?

    Would it be feasible (computationally) to work with 2 or more offscreen contexts and use a combination of blending and translation to achieve the "text outline" effect? Are there any other clever ways to achieve this effect?

    Thanks for your time.
    Mike

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: Optimizing offscreen 2D text rendering.

    If you asked in a forum that's more focused on the font library of your choice and less focused on OpenGL, you'd probably get better answers faster.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2002
    Location
    Enns, Austria
    Posts
    9

    Re: Optimizing offscreen 2D text rendering.

    I am trying something similar too using osmesa under linux. Did you manage to set the font-color using glColor? When I try, my FTGLPixmapFont only gets rendered white.

Posting Permissions

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