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

Apply screen DPI scaling and expose logical coordinates instead of physical (?) #6

Open
hecrj opened this issue Apr 24, 2019 · 0 comments
Labels
help wanted Extra attention is needed improvement An internal improvement question Further information is requested

Comments

@hecrj
Copy link
Owner

hecrj commented Apr 24, 2019

As of now, Coffee converts logical coordinates into physical coordinates (examples here and here) for everything.

However, the winit::dpi documentation seems to hint that we should instead expose logical coordinates everywhere and apply a scaling transformation when rendering on screen. This can be easily implemented by making Frame apply a scaling transformation using Target::with_transform in the as_target method here.

This would have the benefit that games will look similar in size in different devices. However, targeting specific pixels when rendering becomes harder. Can this cause graphical glitches? Maybe Window could expose the dpi value so developers can undo the dpi scaling if they deem necessary? What about a different type, like Frame but that does not apply a DPI transformation when seen as a Target?

@hecrj hecrj added help wanted Extra attention is needed question Further information is requested labels Apr 24, 2019
@hecrj hecrj changed the title Apply screen DPI scaling and expose logical coordinates instead of physical Apply screen DPI scaling and expose logical coordinates instead of physical (?) Apr 24, 2019
@hecrj hecrj added the improvement An internal improvement label Apr 25, 2019
@hecrj hecrj mentioned this issue May 27, 2019
24 tasks
@hecrj hecrj pinned this issue Jun 13, 2019
@hecrj hecrj unpinned this issue Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed improvement An internal improvement question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant