Skip to content

ImFontAtlas::TexID remains unset after a call to ImGuiIntegration::Context::relayout #60

Description

@rune-scape

ImGuiIntegration::Context::relayout() creates the GL::Texture2D for the font atlas, but does not set the TexID in the ImFontAtlas object.

I may have just missed something, but I couldn't find any way to access the imgui font atlas texture.

Simple fix tho!

Around there this line should fix it:

io.Fonts->SetTexID(reinterpret_cast<ImTextureID>(&_texture));
or
io.Fonts->SetTexID(&_texture);

I am unsure if the reinterpret cast is needed, I would expect it, because ImTextureID is void*.

It seems like static_cast<ImTextureID>() is used elsewhere, so idk.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions