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

HiDPI with Emscripten and GLFW #7519

Open
mikamyara opened this issue Apr 21, 2024 · 0 comments
Open

HiDPI with Emscripten and GLFW #7519

mikamyara opened this issue Apr 21, 2024 · 0 comments

Comments

@mikamyara
Copy link

Version/Branch of Dear ImGui:

Version 1.90.5

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

emscripten 3.1.57

Full config/build information:

No response

Details:

I searched a lot but I did not find something satisfactory to work with HiDPI in the contexte of ImGUI/emscripten/GLFW.
I rewrote a part of my code to insert a scaling factor, for example by 2, then create a glfw window twice the size, as well as for the viewport. I rescaled fonts as well as the addRect/addline/addEverything I used in custom widgets. Then I display all and I get a really better quality. Unfortunately : the mouse now does not work, I guess it behaves as if the image was not downscaled by a factor 2.
What should be the good practice in this context ?
Best Regards,
Mike

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

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

No branches or pull requests

2 participants