Various fixes:

+ disable VBO rendering in split views
+ activate multi-sampling in split view for manual alignment
+ share GL widget in case a document has multiple views to make VBO rendering work correctly
This commit is contained in:
wmayer
2017-09-23 11:14:41 +02:00
parent 3e7dad49e2
commit 5604e64f54
6 changed files with 89 additions and 66 deletions

View File

@@ -1055,7 +1055,14 @@ void Document::createView(const Base::Type& typeId)
std::list<MDIView*> theViews = this->getMDIViewsOfType(typeId);
if (typeId == View3DInventor::getClassTypeId()) {
View3DInventor* view3D = new View3DInventor(this, getMainWindow());
QtGLWidget* shareWidget = 0;
// VBO rendering doesn't work correctly when we don't share the OpenGL widgets
if (!theViews.empty()) {
View3DInventor* firstView = static_cast<View3DInventor*>(theViews.front());
shareWidget = qobject_cast<QtGLWidget*>(firstView->getViewer()->getGLWidget());
}
View3DInventor* view3D = new View3DInventor(this, getMainWindow(), shareWidget);
if (!theViews.empty()) {
View3DInventor* firstView = static_cast<View3DInventor*>(theViews.front());
std::string overrideMode = firstView->getViewer()->getOverrideMode();