Processing for Android

VR renderers

The built-in VR library includes two renderers: STEREO and MONO. The STEREO renderer will generate a stereo view of the sketch, rendering each frame twice (once for each eye) and applying the approriate eye transformations.


import processing.vr.*;

void setup() {
  fullScreen(STEREO);
}

void draw() {
  translate(width/2, height/2);
  box(300);
}

Meanwhile, the MONO renderer will generate a monoscopic view, still reflecting the movement of the phone.


import processing.vr.*;

void setup() {
  fullScreen(MONO);
}

void draw() {
  translate(width/2, height/2);
  box(300);
}