Skip to content

Commit

Permalink
Set attribute to share OpenGL contexts
Browse files Browse the repository at this point in the history
Setting this attribute will make sure OpenGL resources are alive when the parent widget is changed during layout changes like full screen view or changing docking configuration.
  • Loading branch information
magnesj committed Feb 7, 2024
1 parent 163d54f commit 1703f33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ApplicationExeCode/RiaMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ int main( int argc, char* argv[] )
}
#endif

// The Qt::AA_ShareOpenGLContexts setting is needed when we have multiple viz widgets in flight
// and we have a setup where these widgets belong to different top-level windows, or end up
// belonging to different top-level windows through re-parenting.
// See test application QtTestBenchOpenGLWidget
QApplication::setAttribute( Qt::AA_ShareOpenGLContexts );

// Create feature manager before the application object is created
RiaMainTools::initializeSingletons();

Expand Down

0 comments on commit 1703f33

Please sign in to comment.