Cleaned up the Qt find package, and made changed the default threading model to SingleThreaded when using Qt5 to avoid crash due to regresssion since Qt4.
This commit is contained in:
parent
ea429d5d46
commit
fd85542d8f
@ -601,7 +601,7 @@ IF(OSG_USE_QT AND NOT ANDROID)
|
||||
|
||||
#If we have found Qt5, let's try to top off by getting the webkit as well
|
||||
IF ( Qt5Widgets_FOUND )
|
||||
FIND_PACKAGE(Qt5WebKitWidgets)
|
||||
FIND_PACKAGE(Qt5WebKitWidgets QUIET)
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
@ -93,7 +93,13 @@ int main( int argc, char** argv )
|
||||
{
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
// Qt5 is currently crashing and reporting "Cannot make QOpenGLContext current in a different thread" when the viewer is run multi-threaded, this is regression from Qt4
|
||||
osgViewer::ViewerBase::ThreadingModel threadingModel = osgViewer::ViewerBase::SingleThreaded;
|
||||
#else
|
||||
osgViewer::ViewerBase::ThreadingModel threadingModel = osgViewer::ViewerBase::CullDrawThreadPerContext;
|
||||
#endif
|
||||
|
||||
while (arguments.read("--SingleThreaded")) threadingModel = osgViewer::ViewerBase::SingleThreaded;
|
||||
while (arguments.read("--CullDrawThreadPerContext")) threadingModel = osgViewer::ViewerBase::CullDrawThreadPerContext;
|
||||
while (arguments.read("--DrawThreadPerContext")) threadingModel = osgViewer::ViewerBase::DrawThreadPerContext;
|
||||
|
Loading…
Reference in New Issue
Block a user