• Advertisement
Sign in to follow this  

how to create my own animated cursor...

This topic is 4790 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 I'm trying to create a simple button. Now I need an animated mouse cursor to click the button. I have read somewhere that I have to render my cursor to front-buffer. But I don't know how... help me thanks <smile>

Share this post


Link to post
Share on other sites
Advertisement
What language and graphics utility are you using?

It is necessary to help you more specifically.

Share this post


Link to post
Share on other sites
oh sorry, I'm so late.

I'm using C++ and DirectX9.
I'm trying to create a small game (2D game).
It's my exercise in school.

I have read some where that mouse cursor should be rendered in front-buffer.
And rendering the mouse cursor should be run in a thread.
That makes game faster.

that's it. I need an impressive mouse cursor <smile>

Share this post


Link to post
Share on other sites
Well what I would do is simply render the bitmap at the location of the mouse to the Device Context after you are done with whatever renders you are doing. Another option would be using a point sprite or rectangle or something and simply calling that function last.

Share this post


Link to post
Share on other sites
I have thought so too.
But if my game run in a slow PC the cursor will move slowly.
This way will make mouse cursor depend on frame rate.

so any ideas [wink]

[Edited by - fantasy_world on January 7, 2005 4:30:30 AM]

Share this post


Link to post
Share on other sites
Oh you mean jumpy? Sadly there is not MUCH you can do to prevent that if your looking for a real animated sprite. Yes you could stick the rendering of it in another thread, but as long as you use some sort of frame tracking you should be good disregardless.

Share this post


Link to post
Share on other sites
Quote:
Original post by fantasy_world
I have thought so too.
But if my game run in a slow PC the cursor will move slowly.
This way will make mouse cursor depend on frame rate.

so any ideas [wink]

I would say that if your game ran slowly, you're screwed anyway, so why worry about a cursor graphic?

Share this post


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

  • Advertisement