The POculus library intends to render processing sketches to Oculus. It uses JOGL support for Oculus to achieve this functionaility.
POculus provides an Oculus renderer which needs to be specified in size(). Anything you now draw will be rendered in Oculus view.
Note: Oculus needs to be plugged in before running the sketch. Also since, POculus uses updated JOGL libraries, it currently works through eclipse only. You can download all the required jars from here.
Click here to view the example.
Click here to download the jars.