Had a bit of time to do some googling, the guys at solidangle have done all the hard work already:
https://github.com/pedrofe/vr_camera/blob/master/VRCamera.cpp
There's code in there for a stereo cubemap (as well as latlong and others), should be enough to get you going.
More info:
http://pedrofe.com/oculus-camera/