Exemplo n.º 1
0
//--------------------------------------------------------------
void ofApp::captureFunction() {

    fbo.begin();
    ofClear(0,0);

    ofPushMatrix();
    ofScale(2, 2, 2);

    cam.setTransformMatrix(camCapture);

    cam.begin();
    mainDrawing();
    cam.end();

    if (bHide) {
        guiDrawing();
    }

    fbo.end();

    ofPixels _p;
    fbo.readToPixels(_p);

    ofImage _temp;
    _temp.setFromPixels(_p.getData(), posSize.x, posSize.y, OF_IMAGE_COLOR_ALPHA);
    string _file = "../../__" + ofGetTimestampString() + ".png";
    _temp.save(_file);

}
Exemplo n.º 2
0
//--------------------------------------------------------------
void ofApp::draw() {

    cam.begin();
    ofRotateY( rotateY );
    mainDrawing();
    cam.end();

    camCapture = cam.getGlobalTransformMatrix();

    if (bHide) {
        guiDrawing();
    }

}
Exemplo n.º 3
0
int main(int argc, char *argv[]) {
  mainDrawing(argc, argv);
}