I’ve started messing with a new ofAppWindow that allows EGL without X for the RPI4.
I’d like to test it as an ofxAddon first if possible. Can I do this without having to include it in ofMainLoop?
I’ve started messing with a new ofAppWindow that allows EGL without X for the RPI4.
I’d like to test it as an ofxAddon first if possible. Can I do this without having to include it in ofMainLoop?
you should be able to do:
...
auto window = std::make_shared<MyWindow>(settings);
auto app = std::make_shared<ofApp>();
ofRunApp(window, app);
thanks @arturo
This code does compile however it exits immediately after setup. If I put the replace the code in ofAppEGLWindow
and use this setup
ofGLESWindowSettings settings;
settings.setSize(1280, 720);
settings.setGLESVersion(2);
ofCreateWindow(settings);
ofRunApp( new ofApp());
It keeps running
I try your above code replacing MyWindow
with ofAppEGLWindow
I get a compile error
no matching function for call to ‘ofAppEGLWindow::ofAppEGLWindow(ofGLESWindowSettings&)
I am guessing this is why ofCreateWindow
is necessary
oh yeah sorry you need ofRunMainLoop()
at the end. For reference check the multi window examples which are setup like this.
Yep that did it - thanks!