Processing for Android

eyeType

This variable tells you which is being drawn by the Cardboard renderer. It will be either LEFT or RIGHT when using the STEREO renderer, or MONOSCOPIC when using the MONO renderer.


void draw() {
  PGraphicsCardboard pgc = (PGraphicsCardboard)g;
  if (pgc.eyeType == PCardboard.LEFT) {
    background(200, 50, 50);
  } else if (pgc.eyeType == PCardboard.RIGHT) {
    background(50, 50, 200);
  } else if (pgc.eyeType == PCardboard.MONOCULAR) {
    background(50, 200, 50);
  }
}