Warning: readfile(http://alkoltashov.narod.ru/leebyron.com.txt) [function.readfile]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/leebyron.com/www/how/wp-content/themes/leebyronhow/header.php on line 20

ofxSDL

I love openFrameworks, but there a few things it just doesn’t do well. Namely joystick events.

openFrameworks uses a windowing system under the hood called GLUT, or the openGL Utility Toolkit. GLUT’s primary benefit is being exceptionally simple and ubiquitous. Anywhere you can use openGL, you can use GLUT. However GLUT has it’s limitations; in it’s simplicity it lacks full featured events from keyboards, mouse and joystick controllers.

That’s where SDL comes in. SDL is similar to GLUT in many ways, but rather than being made as a general purpose utility like GLUT, it is targeted at simple video game creation. This gives it quite reasonable joystick controller and mouse event support.

Thanks to the work over the last year, openFrameworks has become more and more abstracted from it’s windowing toolkit. This was vital for getting openFrameworks to seamlessly work on an iPhone, where GLUT doesn’t exist. I took advantage of this abstraction and made an addOn called ofxSDL. It will cause openFrameworks to use SDL rather than GLUT as it’s windowing system, giving you access to better joystick support.

ofxSDL is still in infancy, and there is a list of todo items before it could be considered finished, but I wanted to put it out there for anyone interested to use and give feedback on.

Reader Replies

  1. Jonathan Brodsky replied
    on Mar 24th, 2010 at 3:25 pm

    this is awesome. I tried to dig into the hid to capture joystick events a few months back and it kinda blew my mind.

  2. Joannie Wu replied
    on Mar 24th, 2010 at 5:21 pm

    This is some nerd shit. Go outside and ride a bike. <3

  3. Things to do in Santa Cruz replied
    on Sep 29th, 2011 at 12:23 am

    LMAO Joanne, nice one!

Leave a Reply