View Full Version : Mouse cursor?
06-07-2000, 09:44 AM
How can I do mouse support in my game? Should I use the original´windows pointer or is there any OGL pointer?
06-07-2000, 10:30 AM
OpenGL has nothing to do with mouse input. You will either have to use the Windows mouse and mouse pointer functions, or use DirectX's DirectInput. DirectInput is fairly easy to learn to use and it makes handling multiple input devices very easy to do. I would suggest you hide the windows mouse cursor, and just draw your own when you need one since some older 3D video cards can not display the windows mouse cursor.
[This message has been edited by DFrey (edited 06-07-2000).]
Interesting topic here, Im not to sure but i think you can use your windows mouse cursor on any card except for the Voodoo range of cards. On these cards you need to make your own cursor. Can someone confirm this?
For all other cards make sure when you are creating your window you have
wndclass.hCursor = LoadCursor (NULL, IDC_CROSS);
and then somewhere in your init
// to set your cursor to center screen
SetCursorPos(nScreenWidth/2, nScreenHeight/2); // set mouse to screen centre
Hope this helps
06-09-2000, 07:51 AM
hmmm, directInput sounds nice, do U know any good tutorials???
06-09-2000, 10:08 AM
You might want to look at http://www.loonygames.com/content/1.5/cotc/
, this is the article from which I learned about DirectInput.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.