From 04bc6345764e55ae249a622030f26496a0586541 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 18 Jun 2013 22:34:30 +0100 Subject: steaming pile of crap --- 04_playobjects/src/testApp.cpp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to '04_playobjects/src/testApp.cpp') diff --git a/04_playobjects/src/testApp.cpp b/04_playobjects/src/testApp.cpp index c1850f9..6351282 100644 --- a/04_playobjects/src/testApp.cpp +++ b/04_playobjects/src/testApp.cpp @@ -21,7 +21,9 @@ void testApp::setup() { for (int i=0;i1) players[i].addPlayer(XML.getAttribute("rec","right","",i)); + if (numDevices==2) { + players[i].addPlayer(XML.getAttribute("rec","right","",i)); + } players[i].audio=XML.getAttribute("rec","audio","",i); } } @@ -34,20 +36,14 @@ void testApp::setup() { receiver.setup(OSCPORT); - user.setUseMaskTexture(true); - user.setUsePointCloud(true); - user.setPointCloudDrawSize(2); // this is the size of the glPoint that will be drawn for the point cloud - user.setPointCloudResolution(2); // this is the step size between points for the cloud -> eg., this sets it to every second point - - drawmovies=false;drawcloud=true; + drawmovies=false;drawcloud=false; } void testApp::startPlayers(int newplayer){ if (playing>-1) players[playing].stop(); - soundplayer.stop(); usleep(100000); playing=newplayer; - players[playing].play(user); + players[playing].play(); } //-------------------------------------------------------------- @@ -82,8 +78,19 @@ void testApp::draw(){ ofPushMatrix(); - if (drawmovies) players[playing].drawWindows(); - if (drawmovies) players[playing].drawCloud(); + if (playing>-1) { + if (drawmovies) { + players[playing].drawWindows(); + } + + if (drawcloud) { + cam.begin(); + ofTranslate(ofGetWidth()/2, ofGetHeight()/2,0); + players[playing].drawCloud(); + ofDrawAxis(100); + cam.end(); + } + } ofPopMatrix(); @@ -93,6 +100,7 @@ void testApp::draw(){ msg += "\nclip: "+ofToString(playing); if (playing>-1) msg += "\n"+players[playing].audio; msg += "\noffset: "+ofToString(offset); + if (drawcloud>-1) msg += "\nwith cloud"; verdana.drawString(msg, 10, 10); } -- cgit v1.2.3