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

Cannot render any texture (including the Font texture) in my window using ImGui.Image #444

Open
SkyLeite opened this issue Nov 12, 2023 · 0 comments

Comments

@SkyLeite
Copy link

Hello!

I've been using ImGuiNET for my project and it seems to work perfectly, except for when I attempt to show any kind of image. My code is a complete mess since I'm still experimenting, but the following piece of code produces the window attached after it

var foo = true;
if (ImGui.Begin("Font", ref foo, 0))
{
    var io = ImGui.GetIO();
    if (io != null)
    {
        var texID = io.Fonts.TexID;
        var texW = io.Fonts.TexWidth;
        var texH = io.Fonts.TexHeight;

        ImGui.Text("FontTex");
        igNET.ImGui.Image(texID, new Vector2(texW, texH), new Vector2(0.0f, 0.0f), new Vector2(1.0f, 1.0f), new Vector4(1.0f, 1.0f, 1.0f, 1.0f));
    }
}

image

I assumed this was an issue with my rendering pipeline, but as you can see in the following screenshot, the Dear ImGui debugger (which is called from the same function as the previous snippet) has no problem rendering it.

image

What could be causing this issue? Is there any more information I can provide that could help narrow the issue down?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant