Sorry I didn't post the entire code to keep it simple but yes I'm aware of creating the gui stuff in window callbacks. So my main is :
ofGLFWWindowSettings gl_settings;
gl_settings.setGLVersion( 4, 1 );
gl_settings.width = 1024;
gl_settings.height = 768;
shared_ptr<ofAppBaseWindow> main_window = ofCreateWindow( gl_settings );
gl_settings.width = 800;
gl_settings.height = 600;
shared_ptr<ofAppBaseWindow> gui_window = ofCreateWindow( gl_settings );
shared_ptr<ofApp> main_app( new ofApp );
main_app->setupGUI();
ofAddListener( gui_window->events().update, main_app.get(), &ofApp::updateGUI );
ofAddListener( gui_window->events().draw, main_app.get(), &ofApp::drawGUI );
ofRunApp( main_window, main_app );
ofRunMainLoop();
I just tried to set glVersion to 4.1 in the basic guiExemple, without having multiple windows like so :
// ofSetupOpenGL(1024,768, OF_WINDOW);// <-------- setup the GL context
ofGLFWWindowSettings gl_settings;
gl_settings.setGLVersion( 4, 1 );
gl_settings.width = 1024;
gl_settings.height = 768;
ofCreateWindow( gl_settings );
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());
and again the text disappears, so I think there is really something wrong with ofxGUI and gl version 3+.
I thought maybe a context would be created for each window, but yes I was wrong.