PDA

View Full Version : anybody knows joystick coding?



06-11-2002, 12:43 AM
Hi,
I want to use joystick controls in my program. But I don't know where to find those functions, how it works etc. Can anybody tell me where i can find a documentation or tutorial for that?

Thanks in advance

Angelo

Bob
06-11-2002, 01:21 AM
Here (http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000410) maybe.

06-11-2002, 02:01 AM
thanks bob.

My program is sort of platform independent. If I'm using directx for joystick then won't the program is resticted to windows environment?

thanks again

06-11-2002, 02:09 AM
I'm using VC++ & opengl. full source code in opengl.

Bob
06-11-2002, 02:36 AM
If you use DirectX, your program will be restricted to the Windows platform, yes. I don't know of any pltform independent library that can handle joystick input, sorry.

But on the other hand, there's no such thing as platform independent code when you start doing more advanced stuff. Different platforms are so different that you have to use compiler directives to compile different parts of code for different platforms.

I suggest you go for DirectX for Windows, and some other library for other platforms. For example, make a generic joystick input function, so you can use the same function, in the same way, for all platforms. The function itself can be different for all platforms.

coredump
06-11-2002, 02:54 AM
SDL (http://www.libsdl.org) can handle joystick input. it's like directx (libraries for sound, music, input, networking, etc.) but for many platforms.

b

jono_123
06-11-2002, 11:44 PM
i heard that glut has a joystick function

Bob
06-12-2002, 01:39 AM
Er, yeah, forgot that GLUT has some joystick support. But on the other hand, it only works (IF it works http://www.opengl.org/discussion_boards/ubb/biggrin.gif ) under Windows.