diff options
Diffstat (limited to 'liveengine/src/viewport.cpp')
| -rwxr-xr-x | liveengine/src/viewport.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
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;i<w*2;i+=(w*fscale)) {
for (int j=starty;j<h*2;j+=(h*fscale)) {
rb2.draw(i,j,w*fscale,h*fscale);
@@ -110,7 +110,7 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofPushStyle();
if (note>0||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();
}
|
