summaryrefslogtreecommitdiff
path: root/FESgui/src/main.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2023-04-17 19:44:00 +0100
committerTim Redfern <tim@getdrop.com>2023-04-17 19:44:00 +0100
commit19be92e0aff674b95bdae72fe7a2e409fd1bf77a (patch)
tree079acfc11ffbff8f11b120649f5cb3a623e354d6 /FESgui/src/main.cpp
parent5309ef89393aa56083d1c2238c517c3d576907ec (diff)
add to archive
Diffstat (limited to 'FESgui/src/main.cpp')
-rw-r--r--FESgui/src/main.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/FESgui/src/main.cpp b/FESgui/src/main.cpp
new file mode 100644
index 0000000..226ae24
--- /dev/null
+++ b/FESgui/src/main.cpp
@@ -0,0 +1,46 @@
+#include "ofMain.h"
+#include "ofApp.h"
+
+
+//========================================================================
+int main(int argc, char *argv[]){
+
+
+ ofGLFWWindowSettings settings;
+
+ //settings.setGLVersion(3,2); if using kinect
+
+ settings.decorated = true;
+ settings.setSize(outputWindowSize.x,outputWindowSize.y);
+ settings.setPosition(ofVec2f(1700,0));
+ settings.resizable = false;
+
+ shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
+ mainWindow->setVerticalSync(false);
+
+ settings.setSize(1200,1100);
+ settings.setPosition(ofVec2f(0,20));
+ settings.resizable = false;
+
+ // share OpenGL resources with other windows
+ settings.shareContextWith = mainWindow;
+
+ settings.decorated = true; //doesn't suppress FS title bar
+ shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);
+ guiWindow->setVerticalSync(false);
+
+ shared_ptr<ofApp> mainApp(new ofApp);
+
+ 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