diff options
Diffstat (limited to 'liveengine/src/viewport.cpp')
| -rwxr-xr-x | liveengine/src/viewport.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/liveengine/src/viewport.cpp b/liveengine/src/viewport.cpp index 82ee5a0..fab77ce 100755 --- a/liveengine/src/viewport.cpp +++ b/liveengine/src/viewport.cpp @@ -68,6 +68,7 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) { oy=_oy;
rb1.allocate(w,h,GL_RGB);
rb2.allocate(w,h,GL_RGB);
+ rb3.allocate(w,h,GL_RGB);
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));
}
@@ -214,13 +215,18 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, }
rb1.end();
-
+
rb2.begin();
ofSetColor(255,255,255);
+ rb1.draw(0,0);
+ rb2.end();
+
+ rb3.begin();
+ ofSetColor(255,255,255);
ofBackground(0,0,0);
//rb1.draw(0,0);
- //map on kinect skeleton
+ //map onto kinect skeleton
bindTexture(rb1);
glPushMatrix();
@@ -324,7 +330,7 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, unbindTexture(rb1);
- rb2.end();
+ rb3.end();
ofPushMatrix();
ofTranslate(x+(w/2),y+(h/2));
@@ -332,7 +338,7 @@ void viewport::mapdraw(float a,unsigned char* controllers,int xshift,int yshift, //ofTranslate(-abs(sin(ofDegToRad(r))*h/2)-abs(cos(ofDegToRad(r))*w/2),-abs(sin(ofDegToRad(r))*w/2)-abs(cos(ofDegToRad(r))*h/2));
ofTranslate(ox,oy);
- rb2.draw(0,0);
+ rb3.draw(0,0);
ofPopStyle();
|
