summaryrefslogtreecommitdiff
path: root/gui/src/main.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2017-08-31 00:34:32 +0100
committerTim Redfern <tim@getdrop.com>2017-08-31 00:34:32 +0100
commitb0d54aadaf9dfb3b2f14974f55b3a725619ea445 (patch)
treead882b21f92f3124cb0713494d15fbc4614ecfc7 /gui/src/main.cpp
parent52f12dfc10edfc4dd063b610f65dd2e901d3080c (diff)
correct window scale
Diffstat (limited to 'gui/src/main.cpp')
-rw-r--r--gui/src/main.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/gui/src/main.cpp b/gui/src/main.cpp
index 072f406..52f9d48 100644
--- a/gui/src/main.cpp
+++ b/gui/src/main.cpp
@@ -3,6 +3,7 @@
//========================================================================
int main(int argc, char *argv[]){
+ /*
ofSetupOpenGL(1600,200,OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
@@ -10,10 +11,37 @@ int main(int argc, char *argv[]){
// pass in width and height too:
ofApp *app = new ofApp();
- app->arguments = vector<string>(argv, argv + argc);
+
ofRunApp(app); // start the app
+ */
+
+ //app->arguments = vector<string>(argv, argv + argc);
+
+ ofGLFWWindowSettings settings;
+ settings.width = 1024;
+ settings.height = 576;
+ settings.setPosition(ofVec2f(300,0));
+ settings.resizable = true;
+ shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
+
+ settings.width = 1600;
+ settings.height = 200;
+ settings.setPosition(ofVec2f(0,700));
+ settings.resizable = true;
+ // uncomment next line to share main's OpenGL resources with gui
+ settings.shareContextWith = mainWindow;
+ shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings);
+ guiWindow->setVerticalSync(false);
+
+ shared_ptr<ofApp> 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);
+ ofRunApp(guiWindow, mainApp);
+ ofRunMainLoop();
}
\ No newline at end of file