• Advertisement
Sign in to follow this  

Using a surface as a cursor

This topic is 4182 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

Advertisement
What API? Direct3D or DirectDraw? What version of DirectX? What SDK version?

Assuming Direct3D9: IDirect3DDevice9::SetCursorProperties to set a surface as a cursor, and to animate it, you'd either change the surface pointer every frame (for frames of animation), or edit the surface directly.

Another alternative is to render a 2D quad where the cursor is, then you can use any standard animation methods for animating it.

Edit: Just notice my link was fubar

[Edited by - Evil Steve on August 11, 2006 3:24:22 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by VanillaSnake21
Thnx for the reply, Im using DirectX v9 and Direct3D as a lib, about the cursor, where do i set the alpha for the cursor so only the part that i need would appear?
Depends how you load the surface. D3DXLoadSurfaceFromFile allows you to specify a colour key, so any pixels matching that coloir get made transparant.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement