PDA

View Full Version : Two mouses?



pszemsza
10-23-2004, 01:00 AM
Hi!
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...

kansler
10-23-2004, 02: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.

pszemsza
10-23-2004, 12:53 PM
Sorry...
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...

SirKnight
10-23-2004, 01: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.

-SirKnight

MZ
10-23-2004, 02: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.

CatAtWork
10-23-2004, 03:00 PM
http://link.mywwwserver.com/~jstookey/arcade/rawmouse/

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

-SirKnight

pszemsza
10-24-2004, 08: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...

arekkusu
10-25-2004, 01: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.)

Obli
10-25-2004, 03: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.

pszemsza
10-25-2004, 04: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:

rgpc
10-25-2004, 08: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, 11:28 PM
Sorry, been out of town for a few days. Thread closed.

-- Tom