summaryrefslogtreecommitdiff
path: root/gui/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/main.cpp')
-rw-r--r--gui/src/main.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/gui/src/main.cpp b/gui/src/main.cpp
new file mode 100644
index 0000000..ed7e18f
--- /dev/null
+++ b/gui/src/main.cpp
@@ -0,0 +1,42 @@
+#include "ofMain.h"
+#include "ofApp.h"
+
+
+//========================================================================
+int main(int argc, char *argv[]){
+
+
+ ofGLFWWindowSettings settings;
+
+ settings.width = 600;
+ settings.height = 1200;
+ settings.setPosition(ofVec2f(0,0));
+ settings.resizable = true;
+
+ //settings.decorated = false; //doesn't suppress FS title bar
+ shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);
+ guiWindow->setVerticalSync(false);
+
+ // share OpenGL resources with other windows
+ settings.shareContextWith = guiWindow;
+ settings.decorated = true;
+
+ settings.width = 1200;
+ settings.height = 900 ;
+ settings.setPosition(ofVec2f(1700,0));
+ settings.resizable = false;
+
+ shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
+ mainWindow->setVerticalSync(false);
+
+ shared_ptr<ofApp> mainApp(new ofApp);
+ //mainApp->setupGui();
+
+ ofAddListener(guiWindow->events().draw,mainApp.get(),&ofApp::drawGui);
+ ofAddListener(guiWindow->events().windowResized,mainApp.get(),&ofApp::guiWindowResized);
+ ofAddListener(guiWindow->events().keyPressed,mainApp.get(),&ofApp::guiKeyPressed);
+
+ ofRunApp(mainWindow, mainApp);
+ ofRunMainLoop();
+}
+ \ No newline at end of file