Why is it not possible to get mouse coordinates as floating-point values?

advertisements

It seems to me that it could be useful in some cases to read higher precision values from the mouse, rather than just a range of discrete pixel coordinates over the current screen resolution. Obviously there is no need for this in GUIs, but for some games it might not even make any sense to associate it with screen resolution at all.

Why are we forced to read it as pixel coordinates instead of just raw analog values?


Under Windows at least, you can retrieve higher resolution coordinates, from 0 to 0xffff, rather than the mouse position translated to screen coordinates, for devices that support high-resolution reporting

Retrieves high resolution points. Points can range from zero to 65,535 (0xFFFF) in both x- and y-coordinates. This is the resolution provided by absolute coordinate pointing devices such as drawing tablets.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms646259(v=vs.85).aspx

One can use non-standard scaling to achieve sub-pixel resolution on the Mac according to one answer here:

High resolution and high framerate mouse coordinates on OSX? (Or other solution?)

Neither answer to that question was accepted, but it may be worth further investigation.