Skip to content

GLFW glfwGetFramebufferSize() and glfwGetWindowSize()  #19842

@luigifcruz

Description

@luigifcruz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions