#72 Generate fonts without pixel-manipulation

closed-rejected
nobody
None
5
2006-07-04
2006-04-03
Waywocket
No

Currently a sprite is created for a font before each
frame/character is added. Then the frame data is added
to the empty pixel array, a frame at a time.
With this patch, the sprite is generated all at once,
after the pixel data is filled. This allows fonts to
work with a videodriver which doesn't use the pixeldata
directly (for displaying sprites with OpenGL they first
have to be converted to a texture, so subsequent
modifications to the pixel array do nothing unless the
sprite is regenerated).

Discussion

  • Waywocket

    Waywocket - 2006-04-04

    Logged In: YES
    user_id=1347201

    I've implemented lazy texture generation so that textures
    are only generated when the sprite is first blitted, so this
    change isn't needed for that reason. I still think it should
    be made however, to give a cleaner seperation between the
    game and the video driver.

     
  • Laszlo Toth

    Laszlo Toth - 2006-04-06

    Logged In: YES
    user_id=885460

    Why that separate makesprite call?
    Couldn't it be done in the Font constructor as before?

     
  • Laszlo Toth

    Laszlo Toth - 2006-07-04
    • status: open --> closed-rejected
     

Log in to post a comment.