Jump to content
  • Advertisement
Sign in to follow this  
pheonix2468

OpenGL Custom Cursor

This topic is 4132 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 im making an openGL game, using c++. And i would like to use a custom sursor i have created, i was wondering how i would do this, i know there are two ways of doing it hardware and software based. I understand that the hardware method (using the windows cursor and the custom file) is easier than the software method. But i cant find anywhere which shows how to acheive this. Help would be appreciated, thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement
AFAIK, changing the cursor is done on the application framework level, i.e., glut, X, win32 etc. (and not in OpenGL itself).

- Vince

Share this post


Link to post
Share on other sites
Hide the windows cursor with

ShowCursor(some hwnd I think, false)

Then just load the image you want for your custom cursor and draw it at the site of the mouse using opengl.

Share this post


Link to post
Share on other sites
Whenever possible, you should use a hardware cursor. There is nothing worse than a lagging cursor, and this can easily happen when you draw your own in software. A hardware cursor is guaranteed to never lag, even under heavy load.

Check out the SetCursor and LoadImage API calls.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!