Is it possible to use my own ofAppWindow class without modifying core?

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);
1 Like

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);
    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.

1 Like

Yep that did it - thanks!