Hello,
I'm writing a cross-platform application with a relatively expensive render cost. To avoid mouse lag, I would like to display the system cursor rather than the OIS rendered one.
Ideally, this would have a custom cursor when inside the render window.
Ie,
> Cursor is "grabbed" (for the purposes of events), but system cursor is still visible.
> System cursor is reskinned
How would I go about doing this?
Any comments or advice would be very much appreciated. Thanks in advance. =)
Further information;
I am currently using OIS mouseEvents.
App uses Ogre::RenderWindow, and has createInputSystem() params "DISCL_FOREGROUND" and "DISCL_NONEXCLUSIVE".
There is some overlap with this thread;
http://www.wreckedgames.com/forum/index.php?topic=323.0 ; disable grabbing mouse, but still get events.
--
My hacky solution was to hide the OIS cursor, and set a custom system cursor;
HCURSOR cursor = (HCURSOR)LoadImage(
NULL,
"c:/cursor.ico", //icon, cursor, or bitmap file (changed actual xplatform path for readability)
IMAGE_CURSOR, //type, matching file above
0, //width. 0 uses the width of the file provided
0, //height. 0 uses the height of the file provided
LR_LOADFROMFILE //Loads the stand-alone image from the file specified by lpszName
);
SetClassLong(window_id, GCL_HCURSOR, (LONG)cursor);
This still suffers from the problem of the actual cursor lagging behind, but it's much less noticeable from the user's perspective.