diff options
Diffstat (limited to 'FESgui/src/main.cpp')
| -rw-r--r-- | FESgui/src/main.cpp | 46 |
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 |
