anybody knows joystick coding?

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


Here maybe.

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

I’m using VC++ & opengl. full source code in opengl.

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.

SDL can handle joystick input. it’s like directx (libraries for sound, music, input, networking, etc.) but for many platforms.


i heard that glut has a joystick function

Er, yeah, forgot that GLUT has some joystick support. But on the other hand, it only works (IF it works ) under Windows.