//-------------------------------------------------------------- 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); }
//-------------------------------------------------------------- void ofApp::draw() { cam.begin(); ofRotateY( rotateY ); mainDrawing(); cam.end(); camCapture = cam.getGlobalTransformMatrix(); if (bHide) { guiDrawing(); } }
int main(int argc, char *argv[]) { mainDrawing(argc, argv); }