Search code examples
openglinputsdlpygamejoystick

Event Handling API's to Use with OpenGL


I've been looking into input handling for an OpenGL application. I want to handle at least two joysticks, keyboard, and mouse. Outsourcing this to python scripting would be a big bonus, but not required.

  • I look at freeglut, but it only supports one joystick.
  • Pygame says it's "input queue is heavily dependent on the pygame display module" so that caused me pause.
  • I'm not familiar with QT or GTK's joystick input handling, and haven't been able to find any document describing my problem concisely.
  • SDL's python binding says it handles these things "quite well". (A statement I'm not sure what to think about.)

Is my concern over the Pygame problem a moot point when I get into it? Can QT or GTK provide this functionality without issue? Is there another alternative that solves my problem?

All else fails I think I can go straight SDL, but I don't know much about it's performance.


Solution

  • This question really isn't about OpenGL, as OpenGL has very little to do with input handling.

    Qt and wxWidgets are not primarily for dealing with input. Obviously they handle mouse and keyboard, but they're basically GUI libraries. Their input systems are designed and intended for that purpose.

    SDL's input component is designed for dealing with input. SFML is also an option. Both of them have Python bindings if that's important for you.