Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sokol_imgui] add the optional backend interface for font management #994

Merged
merged 2 commits into from
Mar 2, 2024

Commits on Feb 22, 2024

  1. [sokol_imgui] add optional backend interface for font creation/destru…

    …ction
    
    This split the font texture  creation in a API function and add a function for the font texture destruction. Those functions are  optional function of the backends.
    
    For instance implemented for opengl3 on the main imgui repo:
    
    https://github.com/ocornut/imgui/blob/659fb41d0a23efbb9ea6cf74f51ecae0a51575b5/backends/imgui_impl_opengl3.h#L39C1-L42C3
    
    Those functions are useful in two cases:
    - when testing different fonts raterization config,  it is convenient to recreate the texture dynamically. The imgui's author provides an example of such application: https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
    - when creating non default font, this allows to remove the burdern of the boilerplate of uploading the font on GPU to the user of sokol_imgui.
    David Caruso committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    6d2eb39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47db82e View commit details
    Browse the repository at this point in the history