#include "ofMain.h" #include "ofApp.h" //======================================================================== int main(int argc, char *argv[]){ /* ofSetupOpenGL(1600,200,OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: ofApp *app = new ofApp(); ofRunApp(app); // start the app */ //app->arguments = vector(argv, argv + argc); ofGLFWWindowSettings settings; settings.width = 1024; settings.height = 576; settings.setPosition(ofVec2f(300,0)); settings.resizable = true; shared_ptr mainWindow = ofCreateWindow(settings); // uncomment next line to share main's OpenGL resources with gui settings.shareContextWith = mainWindow; settings.width = 800; settings.height = 450; settings.setPosition(ofVec2f(1400,0)); settings.resizable = true; shared_ptr previewWindow = ofCreateWindow(settings); previewWindow->setVerticalSync(false); settings.width = 1600; settings.height = 400; settings.setPosition(ofVec2f(0,700)); settings.resizable = true; shared_ptr guiWindow = ofCreateWindow(settings); guiWindow->setVerticalSync(false); shared_ptr mainApp(new ofApp); //mainApp->setupGui(); ofAddListener(mainWindow->events().update,mainApp.get(),&ofApp::updateOutput); ofAddListener(mainWindow->events().draw,mainApp.get(),&ofApp::drawOutput); ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::outputWindowResized); ofAddListener(mainWindow->events().keyPressed,mainApp.get(),&ofApp::outputKeyPressed); ofAddListener(previewWindow->events().draw,mainApp.get(),&ofApp::drawOutput); ofRunApp(guiWindow, mainApp); ofRunMainLoop(); }