Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:badshah400:lapack2023:Leap15
QCSXCAD
0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch of Package QCSXCAD
From 56149e537115275f7bbceead1853c8e11217ae40 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig <Thorsten.Liebig@gmx.de> Date: Wed, 26 Dec 2018 22:51:17 +0100 Subject: [PATCH] vtk: use QVTKOpenGLWidget for vtk>=8 Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de> --- QVTKStructure.cpp | 13 ++++++++++++- QVTKStructure.h | 10 +++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/QVTKStructure.cpp b/QVTKStructure.cpp index 9482dde..1ddf2c8 100644 --- a/QVTKStructure.cpp +++ b/QVTKStructure.cpp @@ -19,7 +19,12 @@ #include "QVTKStructure.h" -#include "QVTKWidget.h" +#if VTK_MAJOR_VERSION>=8 + #include "QVTKOpenGLWidget.h" + #include "vtkGenericOpenGLRenderWindow.h" +#else + #include "QVTKWidget.h" +#endif #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" @@ -93,7 +98,13 @@ QVTKStructure::QVTKStructure() iResolution=32; AllowUpdate=true; +#if VTK_MAJOR_VERSION>=8 + VTKWidget= new QVTKOpenGLWidget(); + vtkNew<vtkGenericOpenGLRenderWindow> renderWindow; + VTKWidget->SetRenderWindow(renderWindow); +#else VTKWidget= new QVTKWidget(); +#endif ren = vtkRenderer::New(); VTKWidget->GetRenderWindow()->AddRenderer(ren); diff --git a/QVTKStructure.h b/QVTKStructure.h index 2809e8a..3a0cb4e 100644 --- a/QVTKStructure.h +++ b/QVTKStructure.h @@ -20,7 +20,11 @@ #include <QtGui> -class QVTKWidget; +#if VTK_MAJOR_VERSION>=8 + class QVTKOpenGLWidget; +#else + class QVTKWidget; +#endif class vtkRenderWindow; class vtkRenderWindowInteractor; class vtkRenderer; @@ -95,7 +99,11 @@ protected: unsigned int uID; } VTKLayerStruct; +#if VTK_MAJOR_VERSION>=8 + QVTKOpenGLWidget *VTKWidget; +#else QVTKWidget *VTKWidget; +#endif //set to false if this widget is hidden bool AllowUpdate; -- 2.28.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor