Apply screen DPI scaling and expose logical coordinates instead of physical (?) #6
Labels
help wanted
Extra attention is needed
improvement
An internal improvement
question
Further information is requested
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 makingFrame
apply a scaling transformation usingTarget::with_transform
in theas_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 thedpi
value so developers can undo thedpi
scaling if they deem necessary? What about a different type, likeFrame
but that does not apply a DPI transformation when seen as aTarget
?The text was updated successfully, but these errors were encountered: