@ErnstHot wrote:
I am trying to make a setup dialog for my app where the user can select the resolution, window mode, various graphics settings and so on, but it seems I need to create a new window to make OF run in fullscreen in a particular resolution - and I'd rather partition the setup dialog and the main app anyway.
As far as I can tell the easiest way would be first to run a setup app in it's own window and when that exits, pass the settings to a new app that can have it's own window in whatever setup it needs, but I can't figure out how to exit an app from within itself without also completely exiting the program.
Here's how I would do the main() function for that, sans the passing of parameters:
int main() { ofGLWindowSettings glSetupWinSettings; glSetupWinSettings.width = 200; glSetupWinSettings.height = 400; glSetupWinSettings.windowMode = ofWindowMode::OF_WINDOW; glSetupWinSettings.setGLVersion(3, 3); ofCreateWindow(glSetupWinSettings); ofSetupApp* setupApp = new ofSetupApp(); ofRunApp(setupApp); if (!setupApp->ShouldQuit()) { ofGLWindowSettings glWindowSettings; glWindowSettings.width = 1280; glWindowSettings.height = 720; glWindowSettings.windowMode = ofWindowMode::OF_GAME_MODE; glWindowSettings.setGLVersion(3, 3); ofCreateWindow(glWindowSettings); ofRunApp(new ofApp()); } }
Which seems to work if I remove the conditional and manually close the first window...
Any help would be appreciated
Posts: 1
Participants: 1