Archived

This topic is now archived and is closed to further replies.

D3D9 Mouse Cursors and DirectInput exclusivity

This topic is 5145 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I''ve been trying to get a D3D9 supported mouse cursor happening, with mixed results. The documentation is pretty scarce for this, and there''s a surprising lack of info about this on the web. Basically it seems as though the only way D3D9 will allow you to set a hardware accelerated cursor (guaranteed to be blitted at 30fps) is to setup a DI Mouse device in NONEXCLUSIVE mode. If I do this, I get to override the WM_SetCursor message to the window and call the D3D9 API methods to set the cursor. However, I would really like to avoid having to send all the mouse stuff via Windows, but get the benefit of accelerated cursor rendering (which I am planning to augment with a separate DI thread to monitor mouse movements and thereby remove the update tie to the main thread''s tick). Does anyone know how/if you can get D3D to provide a hardware mouse in EXCLUSIVE mode? If I try this, in Windowed mode I don''t get a WM_SetCursor (since Windows no longer gets to see the mouse), and although I do get to respond to WM_SetCursor in Fullscreen mode, the same code does not let me see a D3D9 Cursor. Some concrete help from someone who''s experienced this would be much appreciated. Cheers, DChavez.

Share this post


Link to post
Share on other sites
why dont you just draw an ortho textured quad where the mouse is and save your self the hassle.
it''ll be hardware accelerated just as anything else you draw and probably be able to fit in into whatever your projects rendering system is pretty easily and you have total control over how its drawn.

Get busy livin'' or get busy dyin''... - Shawshank Redemption
If a man is talking in the forest, and no woman is around to hear him, is he still wrong? - Unknown
Fulcrum

Share this post


Link to post
Share on other sites