Comments (5)
Looks like a problem with scissor rects not being set up correctly. Have you modified the render backend in any way or do you use an outdated one by accident? Do you use draw list callbacks that could mess up the render state?
from imgui.
There's a possibility this is affected by the different resolution between render target and window size on a Mac with Retina display, but since the provided screenshot appears to be near the top-left of window it may not be this. See if things look different on all 4 corners of the window.
We do this in ImGui_ImplOpenGL3_RenderDrawData()
:
// Will project scissor/clipping rectangles into framebuffer space
ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports
ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
// Project scissor/clipping rectangles into framebuffer space
ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y);
ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y);
if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
continue;
// Apply scissor/clipping rectangle (Y is inverted in OpenGL)
GL_CALL(glScissor((int)clip_min.x, (int)((float)fb_height - clip_max.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y)));
Can you verify the value of draw_data->FramebufferScale
?
Normally ImGui_ImplGlfw_NewFrame()
does:
// Setup display size (every frame to accommodate for window resizing)
int w, h;
int display_w, display_h;
glfwGetWindowSize(bd->Window, &w, &h);
glfwGetFramebufferSize(bd->Window, &display_w, &display_h);
io.DisplaySize = ImVec2((float)w, (float)h);
if (w > 0 && h > 0)
io.DisplayFramebufferScale = ImVec2((float)display_w / (float)w, (float)display_h / (float)h);
And on a Mac this should set io.DisplayFramebufferScale
to (2,2) or (3,3).
Try to adjust that value and see if it makes a difference too.
from imgui.
It may be also good to clarify if this ONLY happens on docked window border as you stated (vs also happening e.g. on any window will scrollable contents). If it does ONLY happens on docked windows as you stated, it may be another cause.
Please also open Tools->Metrics/Debugger->Viewports->Monitors
and report the contents displayed there.
from imgui.
Thanks a lot for the quick answers. I forgot to mention that you can try it out in the browser in our WebAssembly-Emscripten-GLFW-WebGL version on: https://pallas.ti.bfh.ch/slproject/
Just choose the menu Infos > Statistics > Stats on ImGui and then unfold the Tools group:
It has nothing to do with docking.
I will investigate further on
glfwGetWindowSize(bd->Window, &w, &h);
glfwGetFramebufferSize(bd->Window, &display_w, &display_h);
and also check our non-GLFW builds on Android and iOS.
By the way, Thanks a lot for ImGui and your amazing work!
Marcus
from imgui.
I guess I'm using an outdated OpenGL3 ImGui rendering.
I have everywhere a io.DisplayFramebufferScale of [1,1]. On MacOS I'm requesting the OpenGL context with glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GL_FALSE);
from imgui.
Related Issues (20)
- Child windows and docking + IsWindowFocused HOT 3
- Table Not Automatically Adjusting Column width to contained controls. HOT 4
- Automatic button color change on hover HOT 2
- SDL_SetTextInputArea (in ImGui 1.90.9) no longer available >>> SDL_SetTextInputRect HOT 3
- Is Carriage Return usable is window label? HOT 1
- [Bug?] Large (font size) merged fonts leading to blocky, fat text HOT 1
- How to never steal keyboard/window focus but process mouse and keyboard keys ? HOT 3
- Trying to get ImGui to work in high dpi mode with sdl3 renderer backend but its not actually drawing in high dpi.
- I think it's a very old bug in the tables. HOT 1
- Scroll (SetScrollHereY) precision issue with messy font size float (and solution) HOT 3
- FullScreen Mode Issue on MacBook Air M3: Toolbar Buttons Misaligned and Unresponsive Due to Notch HOT 2
- Window goes blank on AMD GPU
- Transparent windows in a secondary viewport HOT 3
- Sub sub-menu fail to display using ImGuiConfigFlags_ViewportsEnable HOT 3
- Unmapped Memory Access
- Style color for active input field (feature request) HOT 2
- Frame rate control for individual windows HOT 1
- DirectX12 'ft2build.h' : No such file or directory
- SetNextWindowRefreshPolicy issues
- ListClipper jumps back when scrolls down to bottom HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui.