Why is it not possible to obtain mouse coordinates as floating point 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.


Windows uses WM_INPUT and WM_MOUSEMOVE, as well as DirectInput and XInput;

By default, it only supports WM_MOUSEMOVE for the main Windows GUI, which is entirely integer-based, but if you were to simultaneously implement WM_INPUT and WM_MOUSEMOVE, you could move the mouse cursor with Subpixel precision.

Some programs would obviously take a lot of advantage of this, such as 1st-person shooters, web browsers (zoomed pages and scrollbars), and image editing programs (such as GIMP, Adobe Photoshop/Illustrator, Paint.NET, etc...)

Plus, having the mouse simultaneously send WM_INPUT and WM_MOUSEMOVE, and having the Windows shell support it natively, would make mouse movement appear smoother in general; to make the most of this, you'd probably want to modify way mouse cursors work in Windows so that a variant of ClearType font rendering can be implemented, using Signed Distance Fields and/or Scalable Vector Graphics to determine the edges of the cursor (This may allow other visual effects as well, like a proper motion blur, lighting, etc).


Edit: I just found out, nearly two years after the fact, that somebody updated the formatting of my post on my birthday. Awesome, thanks dude.