Jump to content
  • Advertisement


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


OpenGL Custom Mouse Cursor in OpenGL...

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

I am looking for a way to use a custom cursor with OpenGL and DirecInput via an image file. I am assuming I should just load the image to a texture and render it every frame. If this is the way to do it, how do I set a hotspot for the cursor? Any other suggestions are appreciated. Another question I had was on how to retrieve and set the mouse coords of the Client area of a window while in windowed mode. I am going to attempt to use GetWindowRect and GetWindowRgn to retrieve the coords of the region and then just retrieve the mouse coords for comparison. Also, if using a custom cursor, how would I obtain of the cursor coords. I have the class giving me the offset of the mouse movement but am unsure how to apply these coords to a custom cursor. Thanks! John [edited by - JohnMMena on April 18, 2003 4:55:16 PM]

Share this post

Link to post
Share on other sites
John- what might be nice is, if you actually don''t bother doing the rendering yourself. That way, the mouse class will be independent of the graphics API used. I''m not sure if there is a very elegant way to do this, but I was just thinking that you could provide the coordinates and then the rendering code will use that to draw the cursor.

Raj Sharma
Wildfire Games
0 A.D. Real-time Strategy Game

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!