Skip to content

[Linux] Rendering a rendertexture to ImGui::Image #11

@kongo555

Description

@kongo555

Hello!
I have simillar problem to #8 and #10 but window.pushGLStates() and window.popGLStates() doesn't help. I'm rendering my scene to texture and then try to display it in imgui. It start to bug on renderTexture.display() method. I call it before ImGui::Render()

    renderTexture.clear();
    map->render(renderTexture);
    simulation->render(renderTexture, delta);
    renderTexture.display();

    ImGui::SFML::Update(elapsed);
    window->clear();
    gui->test();
    gui->render(sprite);
    ImGui::Render();

In test() and render(sprite) i call just imgui functions.
I'm using 2.4 sfml version.

Thanks in advance for help :)

EDIT:
It turns out that i don't have to use renderTexture.display() and then everything is fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions