Open cliche9 opened 1 year ago
Hi, I solved this issue with adding determing scale factor. Add such method in application/platform_glfw.cpp
float getDisplayScaleFactor() {
float xscale = 1.f;
float yscale = 1.f;
auto monitor = glfwGetPrimaryMonitor();
if (monitor)
glfwGetMonitorContentScale(monitor, &xscale, &yscale);
return 0.5f * (xscale + yscale);
}
And change UpdatePixelDencity() to :
void PlatformGLFW::UpdatePixelDensity() {
float xscale, yscale;
glfwGetWindowContentScale(m_Window, &xscale, &yscale);
float scale = xscale > yscale ? xscale : yscale;
#if PLATFORM(WINDOWS)
float windowScale = scale;
float framebufferScale = scale;
#else
float windowScale = getDisplayScaleFactor();//1.0f;
float framebufferScale = scale;
#endif
SetWindowScale(windowScale);// this is how windows is scaled, not window content
SetFramebufferScale(framebufferScale);
}
float getDisplayScaleFactor() { float xscale = 1.f; float yscale = 1.f; auto monitor = glfwGetPrimaryMonitor(); if (monitor) glfwGetMonitorContentScale(monitor, &xscale, &yscale); return 0.5f * (xscale + yscale); }
Thanks this works for me
Thanks for creating such an amazing node-editor framework, it's really great!
Here is my issue which has been raised in
imgui
issues. Here is the link to this issue: https://github.com/ocornut/imgui/issues/6556#issue-1778994593I already checked my code, I have a same code structure like the
blueprint
example, but the problem still exists, any ideas about this?