Archived

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

wannabe H4x0r

custom mouse cursors in directX ?

Recommended Posts

wannabe H4x0r    122
the only way i can seem to get a cursor that runs smoothly is using windows cursors or using d3ddeviceinterface->showcursor(), but both place a lot of restrictions on what you can have (i.e. size, animation, etc.) i tried to get a custom cursor to work with directinput, but the lag was horrible. i just got the position of the mouse before each drawing routine, began my scene, drew my cursor at the end of the scene drawing, ended my scene, and presented; the lag was terrible. going back go either windows cursor or direct3d HAL cursor worked perfectly but is there a better set up? directinput can''t possibly be this unwieldy right?

Share this post


Link to post
Share on other sites
netjockey    122
Hi,

I''m using Dinput8 for Mouse and Keyboard in an Win32/OpenGL App.
The mouse works according to the buffered mouse in the scrawl example/dx-documentation.
My Problem is:
In the example the Cursor is drawn in the OnPaint Function, which is called, when
a WM_PAINT message occurs. If I do it this way my OpenGL graphics are not displayed.
So where should I draw the cursor using the DrawIcon Method? I can''t draw it with OpenGL,
because it should be visible outside the OGL Window.
Is there a possibility to catch the WM_PAINT message, draw the cursor, and the generate
the message again, so that OGL displays the graphics?
Are there other possibilities to solve the problem?

greetz,
netjockey

Share this post


Link to post
Share on other sites