Skip to content

Conversation

@cstef7
Copy link

@cstef7 cstef7 commented Nov 8, 2025

This PR enables fractional scaling of the framebuffer size when reading the resolution from WindowObject.

In GLM, operator*=(glm::ivec2 v, U scalar) casts scalar to int before multiplying the coordinates of v by scalar, so the scaling factor ends up truncated. The solution is simply to convert the resolution to vec2 and back.

Also, resolution should be divided, as opposed to multiplied, by props.scaleFactor, since props.scaleFactor is frameBufferWidth (a.k.a. resolution.x) / width.

Signed-off-by: Cosmin Popa <cosmin7popa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant