//-------------------------- //void ofxQuad::draw(ofTexture image,int sx,int sy,int sw,int sh){ void ofxQuad::draw(ofVideoPlayer image,int sx,int sy,int sw,int sh,int num){ // ofSetColor(255, 255, 255); if(moveall == 1){ if(quadMesh.getNumVertices() < 4){ quadMesh.draw(); } } ofTexture bb; bb = image.getTextureReference(); ofPushMatrix(); // find transformation matrix findHomography(src, dst, matrix); //finally lets multiply our matrix glMultMatrixf(matrix); bb.drawSubsection(0,0,w,h,sx,sy,sw,sh); if(debug){ if(active){ ofSetColor(redColour, 255, 0,255); } else{ ofSetColor(255, 255, 255,255); } // ofDrawBitmapString(ofToString(num), sw,sy); ofRect(0,0,w,h); // verdana30.drawString(ofToString(num), sx,sh+sh); ofSetColor(0, 0, 0); } ofPopMatrix(); if(debug){ ofPushStyle(); ofSetColor(255, 255, 255); ofSetLineWidth(4); ofLine(0, ofGetMouseY(), ofGetWidth(), ofGetMouseY()); ofLine(ofGetMouseX(), 0, ofGetMouseX(), ofGetHeight()); ofPopStyle(); } }