emscripten-core / emscripten-core/emscripten

GLFW glfwGetFramebufferSize() and glfwGetWindowSize()

Open
#19,842 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Looks like the `glfwGetWindowSize` and `glfwGetFramebufferSize` methods are returning the same value although the canvas native and normal dimensions are different. From my understanding, the `glfwGetFramebufferSize` should report the `Module.canvas.[width, height]` and `glfwGetWindowSize` should report the `Module.canvas.[widthNative, heightNative]`. But right now, both functions are reporting the `Module.canvas.[width, height]` value.

Reporting the correct size is particularly important for HiDPI applications. Third-party libraries like ImGui use these functions in many places, making it difficult to fix without modifying Emscripten.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.