View Full Version : Two mouses?

10-23-2004, 12:00 AM
I have a question: Is that possible to use two mouses in OpenGL? I'm working on 3D FPS game with SPlit-Screen, and I want to make two players uses two mouses (first mouse must be indepentend from second one). I don't want to show two cursors, I only want to check positions and states (for example LBUTTONDOWN) both of mouses...

10-23-2004, 01:02 AM
What kind of wanker posts a topic about using mice (yes, that's the plural of mouse) on the OpenGL Advanced forum? Just because your program has a glBegin() function?

Please set your internet to read-only.

10-23-2004, 11:53 AM
I have been looking on other forums, but I couldn't find anything interesting. I think that people who spend many days (weeks? months?) on coding in OpenGL should know answer for my question. Lets say, there was no question. OK?
Sorry also for mistake with mouse - mice, but I'm not native. Now I will remember that...

10-23-2004, 12:17 PM
Is it even possible to use more than one mouse at once? I have never seen or heard of any one ever doing such a thing. I'm not sure if any OS is able to handle more than one mouse at once. To me it doesn't make much sense, kind of like having two or more keyboards connected. Now having multiple monitors makes sense but anything else...I just don't know about.


10-23-2004, 01:07 PM
Never tried such thing, but I know DirectInput is designed to cope with such configurations.

pszemsza, Just try plugging 2 USB mice and use this function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/input/ref/ifaces/idirectinput9/enumdevices.asp) . If DirectX does what it promises, you should get both mice enumerated. If you need help on DirectInput, you will have to look for it somewhere else - OpenGL forum is wrong place.

As for mouses/mice, I pretty often find native English speaking people writing "vertexes" and "indexes", instead of "vertices" an "indices" :)

(edit) Hmm, according to http://dictionary.reference.com/search?q=vertex, the "vertexes" is correct form too... Never mind, then.

10-23-2004, 02:00 PM

10-23-2004, 06:12 PM
Ah...so it IS possible. And now I see some usefull uses for doing such a thing. Neat. :D


10-24-2004, 07:51 AM
Thanks all of you for your help...
Tell me if I'm wrong, but I think that in Settlers II there were option to play with two mice on one computer...
BTW: I think "vertexes" are better
than "mouses" :)
Thanks one more time...

10-25-2004, 12:33 AM
Just for some historical reference, this has been possible since at least 1986. Keyboards and mice are just input devices, like joysticks. There's no reason to expect multiple devices not to work. (How you handle them in your app is of course up to you.)

10-25-2004, 02:19 AM
I must say I had some troubles when I tried to use two mice togheter.
I used DI8 and device enumeration but it didn't work as expected, sometimes the inputs were intermixed. I didn't investigate it too much however and it's likely I was doing something really wrong and easy to fix.
I'll want to look at this in the future again so I would be glad to read something interesting.

Fine, it's off topic. I realize it but that's interesting anyway.

10-25-2004, 03:36 AM
Tell me, if I'm wrong, but I think that it is a topic question (to some level...). The only other topic I can connect with it is WinAPI, but I've never heard of using multiple mice in it, and I can't imagine any way to use it. I think the only one sensible way of using multiple mice is writing a games in any graphical API, like OpenGL.

Sorry, I think I've made many mistakes... :eek:

10-25-2004, 07:43 PM
You are kidding right? What on earth does Opengl have to do with mice? You could be using DirectX or GDI for all we care. OpenGL knows NOTHING about your mouse or even your cursor.

Where have the moderators gone? It took us long enough to get moderators and now they seem to have vanished...

Tom Nuydens
10-25-2004, 10:28 PM
Sorry, been out of town for a few days. Thread closed.

-- Tom