In my project, I use alot of direct non-Qt OpenGL calls.
At some point during startup I want an opportunity to create/load some initial OpenGL resources. To do this, I need to call QOpenGLWidget::makeCurrent(),
My problem is, I can't call "QOpenGLWidget::makeCurrent()" until after application.exec() is entered. Is there some way I can force my QMainWindow's child QOpenGLWidgets to be initialized before application.exec() is entered?
=
MainWindow mainWindow(argc, argv);
if(!mainWindow.Initialize()) //I'd really like to load my OpenGL resources here...
{
return EXIT_FAILURE;
}
return application.exec(); //But QOpenGLWidget hasn't created the OpenGL context until this is entered.
MainWindow mainWindow(argc, argv);
if(!mainWindow.Initialize()) //I'd really like to load my OpenGL resources here...
{
return EXIT_FAILURE;
}
return application.exec(); //But QOpenGLWidget hasn't created the OpenGL context until this is entered.
To copy to clipboard, switch view to plain text mode
Bookmarks