Skip to content
  • Brian Paul's avatar
    mesa: implement a display list / glBitmap texture atlas · b26ddda1
    Brian Paul authored
    
    
    This improves the performance of applications which use glXUseXFont()
    or wglUseFontBitmaps() and glCallLists() to draw bitmap text.
    
    Basically, we collect all the glBitmap images from the display lists
    and put them into a texture atlas.  To render the bitmaps for a
    glCallLists() command, we render a set of textured quads where each
    quad is textured with one bitmap image.  Actually, the rendering part
    has to be done by the Mesa driver or Mesa/gallium state tracker.
    
    Note that GLUT demos that use glutBitmapCharacter() don't benefit
    from this.
    
    v2, per Nicolai Hähnle:
    - check the max tex rect size is at least 1024.
    - add comment in dd.h that texture_rectangle is required.
    - in _mesa_DeleteLists(), try to delete the atlas before the list(s)
    
    Reviewed-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
    b26ddda1