Load xml on startup failed

Hi guys,

still working on an installation and at the moment the window settings (width height mode) are defined through ofSetupOpenGL

The values are hard-coded, but i need to test on different machines and i don’t feel like recompiling and moving the stuff round all the time.

So i thought: let’s make an external xml file that reads in the data and applies it to the window. But when i do a XML.loadFile in my main.cpp before doing anything else, it returns false. The exact same code in my ofSimpleApp will load the file. Am i missing something here, pathwise or the like.

Is it even possible to load the XML file as the first thing you do? Any ideas how to otherwise make the settings dynamic?

1 Like

Hey - you can set the window size in your testApp::setup function with:

ofSetWindowShape(int width, int height);

There you should be able to read in the xml file and set the window to the right size.

Hope that helps!

1 Like

Nice. But is also possible to switch to GameMode during runtime, or is this only possible at startup?