Custom Mouse Cursor in OpenGL...

Started by
0 comments, last by NoMonkey 21 years ago
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]
Advertisement
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

This topic is closed to new replies.

Advertisement