Skip to main content
gamedev.net
🔒 Locked

Changing cursor image

Started by Fuzztrek Oct 23, 2002 at 5:48 PM 3 replies 250+ views
Original Post
Fuzztrek
Fuzztrek
Hello all, Is there anyway to change the cursor image using directx? Using windows is really slow, is there an alternative? Thanks! Fuzztrek ¬_¬
Bad_Maniac
Bad_Maniac
Using Direct Draw, just hide the cursor, and put a sprite on the mouse coordinates, then you can even animate it, and it will be as fast as your graphic card can blit...

It''''s nice to be important, but it''''s more important to be nice.
Don't we all still remember and miss the day we plotted our first pixel?
Fuzztrek
Fuzztrek
mm.. i should have been more specific.. using direct3D?

kidding :D It should work for both d3d and dd..

Thanks so much!

¬_¬
kressilac
kressilac
I implemented the cursor in our application, using Direct Input. If you acquire the mouse in FOREGROUND, EXCLUSIVE mode the widnows cursor will not be drawn, yet you can still poll DirectInput for the position of the mouse. When you get the position, you will need to draw a mouse texture to the screen. This should only require at most 2 triangles to accomplish and a tiny 16x16 or 32x32 texture. I''m using Renderware, so I used their 2D toolkit to accomplish this. If you''re not using a wrapper around Direct3D, then you will need to figure out how to display a texture in screen space.

Kressilac
Derek Licciardi (Kressilac)Elysian Productions Inc.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.