From 3bf0663e94b6335cb748a50a8b95e8a98d2a0630 Mon Sep 17 00:00:00 2001 From: Comment Date: Thu, 24 Jan 2013 18:07:04 +0000 Subject: folded kinect into main branch --- liveengine/src/viewport.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'liveengine/src/viewport.cpp') diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp index 0311d30..ddd1450 100755 --- a/liveengine/src/viewport.cpp +++ b/liveengine/src/viewport.cpp @@ -1,4 +1,4 @@ -#include "viewport.h" +#include "viewport.h" #define DEBUG 0 //texture binding with normalised coords @@ -76,9 +76,9 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) { } void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift){ - - - + + + // test screen shape /* ofSetColor(255,0,0); @@ -88,7 +88,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofRect(0,h/2,w/2,h/2); ofRect(w/2,0,w/2,h/2); */ - + rb1.begin(); //can be done with texture offset? @@ -97,7 +97,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla while (startx>0) startx-=(w*fscale); int starty=((h-(h*fscale))/2)+yshift; while (starty>0) starty-=(h*fscale); - + for (int i=startx;i0||mode==SOLID) { - switch(mode) { + switch(mode) { case SOLID: ofSetColor(255,0,0); ofRect(0,0,ofGetWidth(),ofGetHeight()); @@ -128,6 +128,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofTranslate(w/2,h/2); ofScale(scale,scale,scale); ofTranslate(-w/2,-h/2); + ofSetColor(255,255,255); if (controlColours) list.layers[note]->draw(a,controllers,w,h,transparentBlack,colShift); else list.layers[note]->draw(a,w,h,colShift); ofPopMatrix(); @@ -144,7 +145,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofSetColor(255,255,255); rb1.draw(0,0); rb2.end(); - + ofPushMatrix(); ofTranslate(x+(w/2),y+(h/2)); ofRotate(r); @@ -152,9 +153,9 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofTranslate(ox,oy); rb2.draw(0,0); - + ofPopStyle(); - + ofPopMatrix(); } -- cgit v1.2.3