From b0d54aadaf9dfb3b2f14974f55b3a725619ea445 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 31 Aug 2017 00:34:32 +0100 Subject: correct window scale --- gui/src/main.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'gui/src/main.cpp') 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(argv, argv + argc); + ofRunApp(app); // start the app + */ + + //app->arguments = vector(argv, argv + argc); + + ofGLFWWindowSettings settings; + settings.width = 1024; + settings.height = 576; + settings.setPosition(ofVec2f(300,0)); + settings.resizable = true; + shared_ptr 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 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); + ofRunApp(guiWindow, mainApp); + ofRunMainLoop(); } \ No newline at end of file -- cgit v1.2.3