diff options
Diffstat (limited to 'liveengine/src/viewport.cpp')
| -rwxr-xr-x | liveengine/src/viewport.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp index e5e5ef3..44ba5ef 100755 --- a/liveengine/src/viewport.cpp +++ b/liveengine/src/viewport.cpp @@ -53,6 +53,7 @@ void unbindTex(ofTexture &tex) { viewport::viewport()
{
+
//ctor
}
viewport::viewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) {
@@ -70,7 +71,7 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) { rb1.allocate(w,h,GL_RGB);
rb2.allocate(w,h,GL_RGB);
rb3.allocate(w,h,GL_RGB);
-
+ isMapped=false;
printf("%ix%i, vp offset: %f,%f\n",w,h,-(sin(ofDegToRad(r))*h/2)-(cos(ofDegToRad(r))*w/2),-(sin(ofDegToRad(r))*w/2)-(cos(ofDegToRad(r))*h/2));
}
@@ -108,12 +109,12 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla ofPushStyle();
- if (note>0) {
+ if (note>0||mode==SOLID) {
switch(mode) { case SOLID: - ofSetColor(255,0,0); - ofRect(0,0,ofGetWidth(),ofGetHeight()); - break;
+ ofSetColor(255,0,0); + ofRect(0,0,ofGetWidth(),ofGetHeight()); + break;
case BLOCKS:
for (int i=0;i<NUM_CONTROLLERS;i++){
ofSetColor(ofColor((controller_colours[i].r*controllers[i])>>7,(controller_colours[i].g*controllers[i])>>7,(controller_colours[i].b*controllers[i])>>7));
@@ -201,7 +202,8 @@ double viewport::getSetting(const string& setting){ return 0.0; }
void viewport::mapdraw(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,bool drawCloud){
- +
+ //printf("drawing mapped frame %i\n",ofGetFrameNum()); ofNode c=ofNode(); ofNode t=ofNode(); t.setParent(c); @@ -239,7 +241,7 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, ofPushStyle();
- if (note>0) {
+ if (note>0||mode==SOLID) {
switch(mode) { case SOLID: ofSetColor(255,0,0); |
