Skip to content

Enable SFML implementation of vertex_cache #70

Open
@cschreib

Description

@cschreib

SFML has an implementation for vertex_cache, but this is currently disabled because the implementation is not working correctly. The reason is that SFML requires texture coordinates in pixels, while lxgui uses normalised coordinates throughout. The conversion was handled on-the-fly for simple quads, but this isn't possible with vertex_cache (it would ruin all the benefits of using a cache in the first place).

I have submitted a PR to SFML to add support for normalised coordinates, which was partly available but not fully exposed to the user: SFML/SFML#1807. In lxgui, the branch https://github.com/cschreib/lxgui/tree/vertex_cache_sfml makes use of this patched SFML to enable vertex_cache in the SFML implementation, which then works perfectly fine and improves performance of text rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions