GLUT and DirectInput--- How?

My program uses GLUT and I want to use the joystick (actually many multiple joysticks). But, I found that GLUT only supports one joystick. Is that true? What if I want to use 4 joysticks for a four player game? It seems that DirectInput would be the best solution but doesn’t DirectInput need to use windows messages to work? That would mean rewriting my framework of my program and removing GLUT?

There must be a better way. Please point me in the right direction. Thank you.

GLFW is a toolkit similar to GLUT, but it has support for up to 16 joysticks, each with an infinite number of buttons and axes (of course, in reality limited by the underlying system).

You don’t need direct input. You can also use winmm (which is what GLFW uses for the joystick support under Windows). Unlike GLUT, GLFW also has joystick support under Linux (and under Mac OS X and AmigaOS, once the ports are done).

Does GLWF totally replace GLUT? Or can I use both at the same time?

I saw the PLIB library at

It has a JS (joystick) library. Does anybody have good/bad experiences with mixing this with GLUT?

Thanks guys!

Originally posted by GameMaker:
Does GLWF totally replace GLUT? Or can I use both at the same time?

For what you are doing (“GameMaker” & joysticks), I suspect that GLFW totally replaces GLUT. The current release lacks some things that GLUT supports, mainly support for multiple windows (things that will be added with time though), but for gaming applications, I think GLFW exceeds GLUT in functionality (better keyboard, joystick, fullscreen, timer and extension handling functionality, for instance).

[This message has been edited by marcus256 (edited 02-02-2003).]