PDA

View Full Version : Custom cursors



01-27-2004, 01:03 AM
hi,
can anyone tell me how to use custom made cursors in opengl? Can I use LoadCursor() for this?
Any help is much appreciated.

mikael_aronsson
01-27-2004, 03:48 AM
http://msdn.microsoft.com has information about this, OpenGL does not know anything about cursors.

Mikael

nexusone
01-27-2004, 05:01 AM
The cursor is managed by the windowing system, example if you are under windows then you need to look at windows type code for changing the cursor.


If you are using the GLUT library, there is a command for changing the cursor to a few pre-defined shapes.


Originally posted by binaa:
hi,
can anyone tell me how to use custom made cursors in opengl? Can I use LoadCursor() for this?
Any help is much appreciated.

dvm
01-27-2004, 05:36 AM
you could also use direct input (i guess it makes sense if you're already using direct x. Adding direct x for only changing one louse cursor is absurd!) and hide the cursor. Then load a custom texture and put it on a small rectangle...then get the mouse coordinates and draw the quad where the mouse is. Got it? Easy eh? Now that I'm thinking it you might even not need direct x, just a bit of windows (or X window?) programming to hide the cursor and get its screen coordinates.

Honk
01-27-2004, 06:18 AM
OpenGL knows nothing about cursors. You can however use functions provided by your operating system to get the current mouse position and then draw a textured quad at that position.