From a2c919f85c366e02cdc71f0fb46f4ebd4e4afebe Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 29 Sep 2022 21:12:40 +0100 Subject: revert to working single plugin chaos --- passadesgui/src/main.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 passadesgui/src/main.cpp (limited to 'passadesgui/src/main.cpp') diff --git a/passadesgui/src/main.cpp b/passadesgui/src/main.cpp new file mode 100644 index 0000000..b1a8365 --- /dev/null +++ b/passadesgui/src/main.cpp @@ -0,0 +1,48 @@ +#include "ofMain.h" +#include "ofApp.h" + + +//======================================================================== +int main(int argc, char *argv[]){ + + + ofGLFWWindowSettings settings; + + + + settings.decorated = true; + + settings.setSize(1200,900); + settings.setPosition(ofVec2f(1700,0)); + settings.resizable = false; + + shared_ptr mainWindow = ofCreateWindow(settings); + mainWindow->setVerticalSync(false); + + settings.setSize(700,1100); + settings.setPosition(ofVec2f(0,0)); + settings.resizable = true; + + // share OpenGL resources with other windows + settings.shareContextWith = mainWindow; + + //settings.decorated = false; //doesn't suppress FS title bar + 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(mainWindow->events().keyReleased,mainApp.get(),&ofApp::outputKeyReleased); + ofAddListener(mainWindow->events().mouseDragged,mainApp.get(),&ofApp::outputMouseDragged); + ofAddListener(mainWindow->events().mousePressed,mainApp.get(),&ofApp::outputMousePressed); + ofAddListener(mainWindow->events().mouseReleased,mainApp.get(),&ofApp::outputMouseReleased); + + ofRunApp(guiWindow, mainApp); + ofRunMainLoop(); +} + \ No newline at end of file -- cgit v1.2.3