From 7641fad8ebc4ba0e6412fcb7a556a705c0a6ea2c Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 5 Jan 2012 00:02:13 +0000 Subject: viewport objectified --- src/testApp.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src/testApp.cpp') diff --git a/src/testApp.cpp b/src/testApp.cpp index 42f7055..7e448fd 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -25,10 +25,12 @@ void testApp::setup(){ mode=CALIBRATE; - views=new viewpoint[1]; + views=new viewpoint[2]; //todo: read this from xml - views[0].setup(ofGetWidth(),ofGetHeight(),0,0); + numViews=2; + views[0].setup(ofGetWidth()/2,ofGetHeight(),0,0); + views[1].setup(ofGetWidth()/2,ofGetHeight(),ofGetWidth()/2,0); activeView=0; } @@ -39,9 +41,11 @@ void testApp::update(){ //-------------------------------------------------------------- void testApp::draw(){ - - views[0].setLight(); - views[0].begin(); + for (int i=0;i