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

Mac os display error! #56

Open
custstu opened this issue May 2, 2024 · 1 comment
Open

Mac os display error! #56

custstu opened this issue May 2, 2024 · 1 comment

Comments

@custstu
Copy link

custstu commented May 2, 2024

截屏2024-05-03 上午12 41 56

on Mac os. the contents on the window don't display normally. It display only when I drag the window to the top left corner of the big main window.

@custstu
Copy link
Author

custstu commented May 4, 2024

After commenting the line “draw_data->ScaleClipRects(io.DisplayFramebufferScale);” in renderDrawList. It displays normally on Macos.

void ImGuiRenderer::renderDrawList(ImDrawData *draw_data)
{
    // Select current context
    ImGui::SetCurrentContext(g_ctx);

    // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
    const ImGuiIO& io = ImGui::GetIO();
    int fb_width = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
    int fb_height = (int)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
    if (fb_width == 0 || fb_height == 0)
        return;
    //draw_data->ScaleClipRects(io.DisplayFramebufferScale);

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