Accepting request 933294 from home:StefanBruens:branches:science
- Update to version 9.1.0, see: https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.1.md - Drop upstream patches: + 0001-clean-up-some-old-opengl-es-stuff.patch + 0001-expose-1d-texture-options.patch + 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch + 0001-Allow-compilation-on-GLES-platforms.patch + 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch + 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch + 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch + 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch + 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch + vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch + vtk-std_numeric_limits.patch - Rebase: + 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch + 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch + 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch - Replace openSUSE python hack with upstreamable solution: + vtk-opensuse-python-metadata.patch -> 0001-Always-generate-Python-Metadata-when-WRAP_PYTHON-is-.patch, 0001-Consider-VTK_PYTHON_SITE_PACKAGES_SUFFIX-for-Python-.patch - Add: + 0001-Add-missing-libm-link-library-to-kissfft-module.patch - Remove Leap 15.1 support from specfile - Remove openmpi1 flavor, add openmpi4 OBS-URL: https://build.opensuse.org/request/show/933294 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=170
This commit is contained in:
parent
4e1cfe3078
commit
d4d99e1c44
@ -1,22 +1,28 @@
|
|||||||
From a9c31af9e6edd45ae01fb2712ad7a3c0d3e3cc37 Mon Sep 17 00:00:00 2001
|
From b035ea7f784a842dda0c3b0dc437514879a873c2 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
Date: Sat, 4 Jul 2020 21:04:52 +0200
|
Date: Sat, 4 Jul 2020 21:04:52 +0200
|
||||||
Subject: [PATCH] Add missing guard required for GLES to disable stereo
|
Subject: [PATCH] Add missing guard required for GLES to disable stereo
|
||||||
rendering
|
rendering
|
||||||
|
|
||||||
fmt.stereo() will evaluate to false for GLES, guard the whole block
|
fmt.stereo()/StereoRender will evaluate to false for GLES, guard the whole
|
||||||
so GL_BACK_* is not used.
|
block so GL_*_RIGHT is not used.
|
||||||
Qt already includes the OpenGL/GLES headers, so GL_ES_VERSION_2_0 will
|
|
||||||
be defined for Qt GLES builds.
|
Change the GL_*_LEFT defines for GLES so it actually refers to a front/
|
||||||
|
back buffer, otherwise on GLES the invalid constant 0 will be used to
|
||||||
|
select the front (0x404) and back buffer (0x405). Remove GL_*_RIGHT
|
||||||
|
defines to avoid any accidental, unguarded use.
|
||||||
---
|
---
|
||||||
GUISupport/Qt/QVTKOpenGLWindow.cxx | 2 ++
|
GUISupport/Qt/QVTKOpenGLWindow.cxx | 5 +++++
|
||||||
1 file changed, 2 insertions(+)
|
Rendering/External/vtkExternalOpenGLRenderWindow.cxx | 2 ++
|
||||||
|
Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 2 ++
|
||||||
|
ThirdParty/glew/vtk_glew.h.in | 6 ++----
|
||||||
|
4 files changed, 11 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/GUISupport/Qt/QVTKOpenGLWindow.cxx b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
diff --git a/GUISupport/Qt/QVTKOpenGLWindow.cxx b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
||||||
index 335feb581c..b692b5490a 100644
|
index 067e27cf6e..79bd714f58 100644
|
||||||
--- a/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
--- a/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
||||||
+++ b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
+++ b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
||||||
@@ -231,6 +231,7 @@ void QVTKOpenGLWindow::paintGL()
|
@@ -259,6 +259,7 @@ void QVTKOpenGLWindow::paintGL()
|
||||||
|
|
||||||
const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
||||||
const auto fmt = this->context()->format();
|
const auto fmt = this->context()->format();
|
||||||
@ -24,14 +30,73 @@ index 335feb581c..b692b5490a 100644
|
|||||||
if (fmt.stereo() && this->RenderWindow->GetStereoRender() &&
|
if (fmt.stereo() && this->RenderWindow->GetStereoRender() &&
|
||||||
this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES)
|
this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES)
|
||||||
{
|
{
|
||||||
@@ -240,6 +241,7 @@ void QVTKOpenGLWindow::paintGL()
|
@@ -272,6 +273,10 @@ void QVTKOpenGLWindow::paintGL()
|
||||||
this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize));
|
this->RenderWindowAdapter->blit(
|
||||||
|
this->defaultFramebufferObject(), GL_BACK_LEFT, QRect(QPoint(0, 0), deviceSize));
|
||||||
|
}
|
||||||
|
+#else
|
||||||
|
+ this->RenderWindowAdapter->blit(
|
||||||
|
+ this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize));
|
||||||
|
+#endif
|
||||||
|
ostate->Pop();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
diff --git a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
|
index 445bfce802..d870568f99 100644
|
||||||
|
--- a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
|
+++ b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
|
@@ -64,12 +64,14 @@ void vtkExternalOpenGLRenderWindow::Start()
|
||||||
|
for (this->GetRenderers()->InitTraversal(sit);
|
||||||
|
(renderer = this->GetRenderers()->GetNextRenderer(sit));)
|
||||||
|
{
|
||||||
|
+#ifndef GL_ES_VERSION_3_0
|
||||||
|
if (bufferType == GL_BACK_RIGHT || bufferType == GL_RIGHT || bufferType == GL_FRONT_RIGHT)
|
||||||
|
{
|
||||||
|
this->StereoRenderOn();
|
||||||
|
this->SetStereoTypeToRight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
+#endif
|
+#endif
|
||||||
{
|
{
|
||||||
this->RenderWindowAdapter->blit(
|
this->SetStereoTypeToLeft();
|
||||||
this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize));
|
}
|
||||||
|
diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
|
index 46064d3360..f5b7f6f0c3 100644
|
||||||
|
--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
|
+++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
|
@@ -1156,6 +1156,7 @@ void vtkOpenGLRenderWindow::BlitDisplayFramebuffersToHardware()
|
||||||
|
|
||||||
|
ostate->vtkglBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||||
|
|
||||||
|
+#ifndef GL_ES_VERSION_3_0
|
||||||
|
if (this->StereoRender && this->StereoType == VTK_STEREO_CRYSTAL_EYES)
|
||||||
|
{
|
||||||
|
// bind the read buffer to detach the display framebuffer to be safe
|
||||||
|
@@ -1168,6 +1169,7 @@ void vtkOpenGLRenderWindow::BlitDisplayFramebuffersToHardware()
|
||||||
|
ostate->vtkglBlitFramebuffer(0, 0, this->Size[0], this->Size[1], 0, 0, this->Size[0],
|
||||||
|
this->Size[1], GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
ostate->vtkglDrawBuffer(this->DoubleBuffer ? GL_BACK_LEFT : GL_FRONT_LEFT);
|
||||||
|
// bind the read buffer to detach the display framebuffer to be safe
|
||||||
|
diff --git a/ThirdParty/glew/vtk_glew.h.in b/ThirdParty/glew/vtk_glew.h.in
|
||||||
|
index 1763e79319..8b3074b357 100644
|
||||||
|
--- a/ThirdParty/glew/vtk_glew.h.in
|
||||||
|
+++ b/ThirdParty/glew/vtk_glew.h.in
|
||||||
|
@@ -52,10 +52,8 @@
|
||||||
|
|
||||||
|
/* some fixes for both ES 2 and 3 */
|
||||||
|
#ifdef GL_ES_VERSION_3_0
|
||||||
|
-#define GL_BACK_LEFT 0
|
||||||
|
-#define GL_BACK_RIGHT 0
|
||||||
|
-#define GL_FRONT_LEFT 0
|
||||||
|
-#define GL_FRONT_RIGHT 0
|
||||||
|
+#define GL_BACK_LEFT GL_BACK
|
||||||
|
+#define GL_FRONT_LEFT GL_FRONT
|
||||||
|
|
||||||
|
/* this sends all the data each time as opposed to allowing a subset */
|
||||||
|
#define glMultiDrawElements(mode, counts, type, indicies, primcount) \
|
||||||
--
|
--
|
||||||
2.27.0
|
2.33.1
|
||||||
|
|
||||||
|
25
0001-Add-missing-libm-link-library-to-kissfft-module.patch
Normal file
25
0001-Add-missing-libm-link-library-to-kissfft-module.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 2e1ac7f5d5045286cbcce8e1787e1e98281e4b9f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Sat, 20 Nov 2021 19:28:57 +0100
|
||||||
|
Subject: [PATCH] Add missing libm link library to kissfft module
|
||||||
|
|
||||||
|
Fixes #18390.
|
||||||
|
---
|
||||||
|
ThirdParty/kissfft/vtkkissfft/CMakeLists.txt | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/ThirdParty/kissfft/vtkkissfft/CMakeLists.txt b/ThirdParty/kissfft/vtkkissfft/CMakeLists.txt
|
||||||
|
index 6cb26cd44f..3e583cffc7 100644
|
||||||
|
--- a/ThirdParty/kissfft/vtkkissfft/CMakeLists.txt
|
||||||
|
+++ b/ThirdParty/kissfft/vtkkissfft/CMakeLists.txt
|
||||||
|
@@ -40,3 +40,7 @@ endif ()
|
||||||
|
target_include_directories(kissfft
|
||||||
|
PRIVATE
|
||||||
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
|
||||||
|
+
|
||||||
|
+if(UNIX)
|
||||||
|
+ vtk_module_link(VTK::kissfft PRIVATE m)
|
||||||
|
+endif()
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
From 5c4e4e5832613e758b7c1389a5dbcc1d57db7c6e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Tue, 9 Jun 2020 17:11:12 +0200
|
|
||||||
Subject: [PATCH] Allow compilation on GLES platforms
|
|
||||||
|
|
||||||
On GLES 2.0 platforms (more specifically, for Qt5 "opengl es2" builds),
|
|
||||||
QOpenGLFunctions_3_2_Core does not exist. Since Qt 5.7,
|
|
||||||
QOpenGlFramebufferObject has a static wrapper method for framebuffer
|
|
||||||
blitting, which in worst case (i.e. no GL_EXT_framebuffer blit
|
|
||||||
extension) is a noop, but handles all GL platform differences otherwise
|
|
||||||
(3.2 Core context, GLES 3.0, or any earlier with required extensions).
|
|
||||||
|
|
||||||
The code ignores the passed in targetId FBO handle, but relies on
|
|
||||||
the default framebuffer object of the context. As the calling code calls
|
|
||||||
QOpenGLWindow::makeCurrent() the context default FBO is the one returned
|
|
||||||
by QOpenGLWindow::defaultFramebufferObject().
|
|
||||||
---
|
|
||||||
GUISupport/Qt/QVTKRenderWindowAdapter.cxx | 21 ++++++++++++++++++++-
|
|
||||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/GUISupport/Qt/QVTKRenderWindowAdapter.cxx b/GUISupport/Qt/QVTKRenderWindowAdapter.cxx
|
|
||||||
index 5a66e236df..e5fc5a6135 100644
|
|
||||||
--- a/GUISupport/Qt/QVTKRenderWindowAdapter.cxx
|
|
||||||
+++ b/GUISupport/Qt/QVTKRenderWindowAdapter.cxx
|
|
||||||
@@ -334,12 +334,17 @@ public:
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
QOpenGLFunctions_3_2_Core* f = this->Context->versionFunctions<QOpenGLFunctions_3_2_Core>();
|
|
||||||
+#else
|
|
||||||
+ QOpenGLFunctions* f = this->Context->functions();
|
|
||||||
+#endif
|
|
||||||
if (!f)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
|
||||||
f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, targetId);
|
|
||||||
f->glDrawBuffer(targetAttachment);
|
|
||||||
|
|
||||||
@@ -358,6 +363,20 @@ public:
|
|
||||||
auto sourceSize = this->FBO->size();
|
|
||||||
f->glBlitFramebuffer(0, 0, sourceSize.width(), sourceSize.height(), targetRect.x(),
|
|
||||||
targetRect.y(), targetRect.width(), targetRect.height(), GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
|
||||||
+#else
|
|
||||||
+ GLboolean scissorTest = f->glIsEnabled(GL_SCISSOR_TEST);
|
|
||||||
+ if (scissorTest == GL_TRUE)
|
|
||||||
+ {
|
|
||||||
+ f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
|
|
||||||
+ }
|
|
||||||
+ auto sourceSize = this->FBO->size();
|
|
||||||
+ QRect sourceRect(0, 0, sourceSize.width(), sourceSize.height());
|
|
||||||
+ unsigned int readAttachment =
|
|
||||||
+ left ? this->RenderWindow->GetFrontLeftBuffer() : this->RenderWindow->GetFrontRightBuffer();
|
|
||||||
+ QOpenGLFramebufferObject::blitFramebuffer(nullptr, targetRect, this->FBO.get(), sourceRect,
|
|
||||||
+ GL_COLOR_BUFFER_BIT, GL_NEAREST, readAttachment, targetAttachment,
|
|
||||||
+ QOpenGLFramebufferObject::DontRestoreFramebufferBinding);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
this->clearAlpha(targetRect);
|
|
||||||
|
|
||||||
@@ -436,7 +455,7 @@ public:
|
|
||||||
{
|
|
||||||
Q_ASSERT(this->Context && this->FBO);
|
|
||||||
|
|
||||||
- QOpenGLFunctions_3_2_Core* f = this->Context->versionFunctions<QOpenGLFunctions_3_2_Core>();
|
|
||||||
+ QOpenGLFunctions* f = this->Context->functions();
|
|
||||||
if (f)
|
|
||||||
{
|
|
||||||
// now clear alpha otherwise we end up blending the rendering with
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
|||||||
|
From a08e2a67c1e6694ba2eb2631c7e8e371bd055b46 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Sat, 20 Nov 2021 23:26:05 +0100
|
||||||
|
Subject: [PATCH] Always generate Python Metadata when WRAP_PYTHON is active
|
||||||
|
|
||||||
|
Python Metadata in accordance with PEP 314 is not only used by wheels
|
||||||
|
(PEP 427/PEP 491), but can also used for `python setup.py
|
||||||
|
install_egg_info`.
|
||||||
|
|
||||||
|
The latter can be used to make a system wide VTK installation available
|
||||||
|
for other python packages (e.g. installed via pip) which require VTK.
|
||||||
|
Without the metadata, pip will not find it and always try to download the
|
||||||
|
wheel.
|
||||||
|
---
|
||||||
|
CMake/vtkPythonMetadata.cmake | 17 +++++++++++++++++
|
||||||
|
CMake/vtkWheelPreparation.cmake | 18 -----------------
|
||||||
|
CMakeLists.txt | 3 ++-
|
||||||
|
3 files changed, 19 insertions(+), 19 deletions(-)
|
||||||
|
create mode 100644 CMake/vtkPythonMetadata.cmake
|
||||||
|
|
||||||
|
diff --git a/CMake/vtkPythonMetadata.cmake b/CMake/vtkPythonMetadata.cmake
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..44fb591321
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/CMake/vtkPythonMetadata.cmake
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+configure_file(
|
||||||
|
+ "${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/setup.py"
|
||||||
|
+ @ONLY)
|
||||||
|
+configure_file(
|
||||||
|
+ "${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/MANIFEST.in"
|
||||||
|
+ @ONLY)
|
||||||
|
+configure_file(
|
||||||
|
+ "${CMAKE_SOURCE_DIR}/Copyright.txt"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/LICENSE"
|
||||||
|
+ COPYONLY)
|
||||||
|
+configure_file(
|
||||||
|
+ "${CMAKE_SOURCE_DIR}/README.md"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/README.md"
|
||||||
|
+ COPYONLY)
|
||||||
|
+
|
||||||
|
diff --git a/CMake/vtkWheelPreparation.cmake b/CMake/vtkWheelPreparation.cmake
|
||||||
|
index 0a4c4786d0..df56a3d98c 100644
|
||||||
|
--- a/CMake/vtkWheelPreparation.cmake
|
||||||
|
+++ b/CMake/vtkWheelPreparation.cmake
|
||||||
|
@@ -84,22 +84,4 @@ elseif (UNIX)
|
||||||
|
endif ()
|
||||||
|
set(VTK_PYTHON_OPTIONAL_LINK ON)
|
||||||
|
|
||||||
|
-configure_file(
|
||||||
|
- "${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
|
||||||
|
- "${CMAKE_BINARY_DIR}/setup.py"
|
||||||
|
- @ONLY)
|
||||||
|
-configure_file(
|
||||||
|
- "${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
|
||||||
|
- "${CMAKE_BINARY_DIR}/MANIFEST.in"
|
||||||
|
- @ONLY)
|
||||||
|
-configure_file(
|
||||||
|
- "${CMAKE_SOURCE_DIR}/Copyright.txt"
|
||||||
|
- "${CMAKE_BINARY_DIR}/LICENSE"
|
||||||
|
- COPYONLY)
|
||||||
|
-configure_file(
|
||||||
|
- "${CMAKE_SOURCE_DIR}/README.md"
|
||||||
|
- "${CMAKE_BINARY_DIR}/README.md"
|
||||||
|
- COPYONLY)
|
||||||
|
-
|
||||||
|
-unset(license_file)
|
||||||
|
unset(wheel_data_dir)
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 371ffd61a6..ccd4409251 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -447,6 +447,8 @@ if (VTK_WRAP_PYTHON)
|
||||||
|
TARGET_SPECIFIC_COMPONENTS "${VTK_TARGET_SPECIFIC_COMPONENTS}"
|
||||||
|
TARGET VTK::vtkpythonmodules)
|
||||||
|
|
||||||
|
+ include(vtkPythonMetadata)
|
||||||
|
+
|
||||||
|
if (APPLE AND VTK_WHEEL_BUILD)
|
||||||
|
list(REMOVE_ITEM CMAKE_INSTALL_RPATH
|
||||||
|
"@loader_path/.dylibs")
|
||||||
|
@@ -547,7 +549,7 @@ install(
|
||||||
|
|
||||||
|
# TODO: HeaderTest exclusions for memcheck.
|
||||||
|
|
||||||
|
-if (VTK_WHEEL_BUILD)
|
||||||
|
+if (VTK_WRAP_PYTHON)
|
||||||
|
include(vtkWheelFinalization)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -0,0 +1,68 @@
|
|||||||
|
From 0cf33c4bf04596e368978e663aa4a2ea42289651 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Sun, 21 Nov 2021 19:14:37 +0100
|
||||||
|
Subject: [PATCH] Consider VTK_PYTHON_SITE_PACKAGES_SUFFIX for Python Metadata
|
||||||
|
files
|
||||||
|
|
||||||
|
When building wheels, VTK_PYTHON_SITE_PACKAGES_SUFFIX is ".", so in this
|
||||||
|
case nothing is changed. For all other builds, e.g. setup.py should be
|
||||||
|
located in the same directory as e.g. vtk.py, otherwise setup.py fails.
|
||||||
|
---
|
||||||
|
CMake/vtkPythonMetadata.cmake | 8 ++++----
|
||||||
|
CMake/vtkWheelFinalization.cmake | 2 +-
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMake/vtkPythonMetadata.cmake b/CMake/vtkPythonMetadata.cmake
|
||||||
|
index 44fb591321..f88f9e8aaa 100644
|
||||||
|
--- a/CMake/vtkPythonMetadata.cmake
|
||||||
|
+++ b/CMake/vtkPythonMetadata.cmake
|
||||||
|
@@ -1,17 +1,17 @@
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
|
||||||
|
- "${CMAKE_BINARY_DIR}/setup.py"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/setup.py"
|
||||||
|
@ONLY)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
|
||||||
|
- "${CMAKE_BINARY_DIR}/MANIFEST.in"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/MANIFEST.in"
|
||||||
|
@ONLY)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_SOURCE_DIR}/Copyright.txt"
|
||||||
|
- "${CMAKE_BINARY_DIR}/LICENSE"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/LICENSE"
|
||||||
|
COPYONLY)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_SOURCE_DIR}/README.md"
|
||||||
|
- "${CMAKE_BINARY_DIR}/README.md"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/README.md"
|
||||||
|
COPYONLY)
|
||||||
|
|
||||||
|
diff --git a/CMake/vtkWheelFinalization.cmake b/CMake/vtkWheelFinalization.cmake
|
||||||
|
index 23c17fd977..269b31e7d0 100644
|
||||||
|
--- a/CMake/vtkWheelFinalization.cmake
|
||||||
|
+++ b/CMake/vtkWheelFinalization.cmake
|
||||||
|
@@ -62,5 +62,5 @@ foreach (vtk_feature IN LISTS vtk_features)
|
||||||
|
string(APPEND vtk_feature_entries
|
||||||
|
" '${vtk_feature}': [],\n")
|
||||||
|
endforeach ()
|
||||||
|
-file(WRITE "${CMAKE_BINARY_DIR}/vtk_features.py"
|
||||||
|
+file(WRITE "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/vtk_features.py"
|
||||||
|
"FEATURES = {\n${vtk_feature_entries}}\n")
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 90c90f9d46..03f5836a0f 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -417,7 +417,7 @@ if (VTK_WRAP_PYTHON)
|
||||||
|
list(REMOVE_DUPLICATES vtk_required_python_modules)
|
||||||
|
endif ()
|
||||||
|
string(REPLACE ";" "\n" vtk_required_python_modules "${vtk_required_python_modules}")
|
||||||
|
- file(WRITE "${CMAKE_BINARY_DIR}/requirements.txt"
|
||||||
|
+ file(WRITE "${CMAKE_BINARY_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}/requirements.txt"
|
||||||
|
"${vtk_required_python_modules}\n")
|
||||||
|
get_property(vtk_soabi GLOBAL
|
||||||
|
PROPERTY _vtk_python_soabi)
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 4253aefd5b5bf5f68177b37b73588ed83d05ac7e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Thu, 2 Jul 2020 19:29:04 +0200
|
|
||||||
Subject: [PATCH] Fix PyVTKAddFile_* function signature mismatch
|
|
||||||
|
|
||||||
The implementation generated in vtkWrapPython.c has void return type, as
|
|
||||||
noted by GCC when using LTO, e.g.:
|
|
||||||
--
|
|
||||||
./build/CMakeFiles/vtkRenderingOpenGL2PythonPython/vtkRenderingOpenGL2PythonInitImpl.cxx:85:24: warning: 'PyVTKAddFile_vtkPointFillPass' violates the C++ One Definition Rule [-Wodr]
|
|
||||||
85 | extern "C" { PyObject *PyVTKAddFile_vtkPointFillPass(PyObject *dict); }
|
|
||||||
| ^
|
|
||||||
./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: return value type mismatch
|
|
||||||
442 | void PyVTKAddFile_vtkPointFillPass(
|
|
||||||
| ^
|
|
||||||
./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: 'PyVTKAddFile_vtkPointFillPass' was previously declared here
|
|
||||||
--
|
|
||||||
---
|
|
||||||
Wrapping/Tools/vtkWrapPythonInit.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Wrapping/Tools/vtkWrapPythonInit.c b/Wrapping/Tools/vtkWrapPythonInit.c
|
|
||||||
index 6b108c1aca..dcccd4cf5d 100644
|
|
||||||
--- a/Wrapping/Tools/vtkWrapPythonInit.c
|
|
||||||
+++ b/Wrapping/Tools/vtkWrapPythonInit.c
|
|
||||||
@@ -61,7 +61,7 @@ static void CreateImplFile(const char* libName, const char* importName, int numD
|
|
||||||
|
|
||||||
for (i = 0; i < numFiles; i++)
|
|
||||||
{
|
|
||||||
- fprintf(fout, "extern \"C\" { PyObject *PyVTKAddFile_%s(PyObject *dict); }\n", files[i]);
|
|
||||||
+ fprintf(fout, "extern \"C\" { void PyVTKAddFile_%s(PyObject *dict); }\n", files[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "\nstatic PyMethodDef Py%s_Methods[] = {\n", libName);
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
From 6b675d1fbb130480725ae5ed3f3bdd995e9b336a Mon Sep 17 00:00:00 2001
|
From f65cf376980777639ac5ef52364678c87f1a721f Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
Date: Fri, 17 Jul 2020 05:00:04 +0200
|
Date: Sun, 21 Nov 2021 22:55:13 +0100
|
||||||
Subject: [PATCH 1/2] GL_POINT_SPRITE is only available for Compatibility
|
Subject: [PATCH] GL_POINT_SPRITE is only available for Compatibility Profiles
|
||||||
Profiles and GLES 1.0
|
and GLES 1.0
|
||||||
|
|
||||||
---
|
---
|
||||||
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++
|
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++
|
||||||
1 file changed, 6 insertions(+)
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
||||||
index 6cd90e0306..7b834fa6e5 100644
|
index d30d61af5e..5a942bfda3 100644
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
||||||
@@ -1126,22 +1126,28 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(
|
@@ -1123,20 +1123,26 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can actually use point sprites here
|
// We can actually use point sprites here
|
||||||
@ -29,8 +29,6 @@ index 6cd90e0306..7b834fa6e5 100644
|
|||||||
|
|
||||||
glDrawArrays(GL_POINTS, 0, n);
|
glDrawArrays(GL_POINTS, 0, n);
|
||||||
|
|
||||||
// free everything
|
|
||||||
cbo->ReleaseGraphicsResources(this->RenderWindow);
|
|
||||||
+#ifdef GL_POINT_SPRITE
|
+#ifdef GL_POINT_SPRITE
|
||||||
if (this->RenderWindow->IsPointSpriteBugPresent())
|
if (this->RenderWindow->IsPointSpriteBugPresent())
|
||||||
{
|
{
|
||||||
@ -42,5 +40,5 @@ index 6cd90e0306..7b834fa6e5 100644
|
|||||||
if (sprite)
|
if (sprite)
|
||||||
{
|
{
|
||||||
--
|
--
|
||||||
2.27.0
|
2.33.1
|
||||||
|
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
From 6cc902225a0c4fe8567071ce6518d5861218ca6a Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Tue, 9 Jun 2020 17:34:39 +0200
|
|
||||||
Subject: [PATCH 1/3] Remove duplicate check for QOpenGLFunctions_3_2_Core*
|
|
||||||
|
|
||||||
The return value is already checked in QVTKRenderWindowAdapter::blit(),
|
|
||||||
no need to do it twice.
|
|
||||||
---
|
|
||||||
GUISupport/Qt/QVTKOpenGLNativeWidget.cxx | 12 +++------
|
|
||||||
GUISupport/Qt/QVTKOpenGLWindow.cxx | 32 ++++++++++--------------
|
|
||||||
2 files changed, 16 insertions(+), 28 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx
|
|
||||||
index 9f058c7141..054079793a 100644
|
|
||||||
--- a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx
|
|
||||||
+++ b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx
|
|
||||||
@@ -19,7 +19,6 @@
|
|
||||||
#include <QOpenGLContext>
|
|
||||||
#include <QOpenGLFramebufferObject>
|
|
||||||
#include <QOpenGLFunctions>
|
|
||||||
-#include <QOpenGLFunctions_3_2_Core>
|
|
||||||
#include <QOpenGLTexture>
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QScopedValueRollback>
|
|
||||||
@@ -237,14 +236,9 @@ void QVTKOpenGLNativeWidget::paintGL()
|
|
||||||
// before proceeding with blit-ing.
|
|
||||||
this->makeCurrent();
|
|
||||||
|
|
||||||
- QOpenGLFunctions_3_2_Core* f =
|
|
||||||
- QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
|
|
||||||
- if (f)
|
|
||||||
- {
|
|
||||||
- const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
|
||||||
- this->RenderWindowAdapter->blit(
|
|
||||||
- this->defaultFramebufferObject(), GL_COLOR_ATTACHMENT0, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
- }
|
|
||||||
+ const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
|
||||||
+ this->RenderWindowAdapter->blit(
|
|
||||||
+ this->defaultFramebufferObject(), GL_COLOR_ATTACHMENT0, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
diff --git a/GUISupport/Qt/QVTKOpenGLWindow.cxx b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
|
||||||
index 8311ac24a8..9c97121db9 100644
|
|
||||||
--- a/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
|
||||||
+++ b/GUISupport/Qt/QVTKOpenGLWindow.cxx
|
|
||||||
@@ -19,7 +19,6 @@
|
|
||||||
#include <QOpenGLContext>
|
|
||||||
#include <QOpenGLFramebufferObject>
|
|
||||||
#include <QOpenGLFunctions>
|
|
||||||
-#include <QOpenGLFunctions_3_2_Core>
|
|
||||||
#include <QOpenGLTexture>
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QScopedValueRollback>
|
|
||||||
@@ -230,25 +229,20 @@ void QVTKOpenGLWindow::paintGL()
|
|
||||||
// before proceeding with blit-ing.
|
|
||||||
this->makeCurrent();
|
|
||||||
|
|
||||||
- QOpenGLFunctions_3_2_Core* f =
|
|
||||||
- QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
|
|
||||||
- if (f)
|
|
||||||
+ const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
|
||||||
+ const auto fmt = this->context()->format();
|
|
||||||
+ if (fmt.stereo() && this->RenderWindow->GetStereoRender() &&
|
|
||||||
+ this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES)
|
|
||||||
{
|
|
||||||
- const QSize deviceSize = this->size() * this->devicePixelRatioF();
|
|
||||||
- const auto fmt = this->context()->format();
|
|
||||||
- if (fmt.stereo() && this->RenderWindow->GetStereoRender() &&
|
|
||||||
- this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES)
|
|
||||||
- {
|
|
||||||
- this->RenderWindowAdapter->blitLeftEye(
|
|
||||||
- this->defaultFramebufferObject(), GL_BACK_LEFT, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
- this->RenderWindowAdapter->blitRightEye(
|
|
||||||
- this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- this->RenderWindowAdapter->blit(
|
|
||||||
- this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
- }
|
|
||||||
+ this->RenderWindowAdapter->blitLeftEye(
|
|
||||||
+ this->defaultFramebufferObject(), GL_BACK_LEFT, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
+ this->RenderWindowAdapter->blitRightEye(
|
|
||||||
+ this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ this->RenderWindowAdapter->blit(
|
|
||||||
+ this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From cce31fb588c24c56848cb4ec28b10f2831232374 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Sat, 18 Jul 2020 02:09:18 +0200
|
|
||||||
Subject: [PATCH] Replace invalid GL_LINE with GL_LINES for glDrawArrays
|
|
||||||
|
|
||||||
GL_LINE applies to glPolygonMode, but glDrawArrays uses GL_LINES.
|
|
||||||
|
|
||||||
(cherry picked from commit bd241df6c5804875d879c4649915e3e83172ba3f)
|
|
||||||
---
|
|
||||||
Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx
|
|
||||||
index c55968d3b8..d24eeeda75 100644
|
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx
|
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx
|
|
||||||
@@ -431,7 +431,7 @@ void vtkOpenGLContextDevice3D::DrawLines(
|
|
||||||
this->BuildVBO(cbo, verts, n, colors, nc, nullptr);
|
|
||||||
this->SetMatrices(cbo->Program);
|
|
||||||
|
|
||||||
- glDrawArrays(GL_LINE, 0, n);
|
|
||||||
+ glDrawArrays(GL_LINES, 0, n);
|
|
||||||
|
|
||||||
// free everything
|
|
||||||
cbo->ReleaseGraphicsResources(this->RenderWindow);
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From 98857882cdd0a08a5102d663dc9510e6343adbfa Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Sun, 28 Jun 2020 22:13:32 +0200
|
|
||||||
Subject: [PATCH 1/2] Replace last glDrawBuffer call with glDrawBuffers(1, ...)
|
|
||||||
|
|
||||||
glDrawBuffer is only available in Desktop OpenGL, while the equivalent
|
|
||||||
glDrawBuffers is valid also for GLES.
|
|
||||||
|
|
||||||
Just defining glDrawBuffer as an empty macro is obviously not the right
|
|
||||||
solution, as the call is also required on GLES. This also causes
|
|
||||||
a compilation failure - GL.h may be included via GLX.h on X11 platforms,
|
|
||||||
and the glDrawBuffer prototype declaration becomes malformed.
|
|
||||||
---
|
|
||||||
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h | 3 ++-
|
|
||||||
ThirdParty/glew/vtk_glew.h.in | 1 -
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
|
||||||
index ddeeb04d38..2e1cc9cbf2 100644
|
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
|
||||||
@@ -324,7 +324,8 @@ public:
|
|
||||||
|
|
||||||
if (this->SavedDrawBuffer != GL_BACK_LEFT)
|
|
||||||
{
|
|
||||||
- glDrawBuffer(this->SavedDrawBuffer);
|
|
||||||
+ const GLenum bufs[1] = { static_cast<GLenum>(this->SavedDrawBuffer) };
|
|
||||||
+ ::glDrawBuffers(1, bufs);
|
|
||||||
}
|
|
||||||
|
|
||||||
ostate->vtkglClearColor(this->SavedClearColor[0], this->SavedClearColor[1],
|
|
||||||
diff --git a/ThirdParty/glew/vtk_glew.h.in b/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
index 009f230b19..1763e79319 100644
|
|
||||||
--- a/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
+++ b/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
@@ -52,7 +52,6 @@
|
|
||||||
|
|
||||||
/* some fixes for both ES 2 and 3 */
|
|
||||||
#ifdef GL_ES_VERSION_3_0
|
|
||||||
-#define glDrawBuffer(arg)
|
|
||||||
#define GL_BACK_LEFT 0
|
|
||||||
#define GL_BACK_RIGHT 0
|
|
||||||
#define GL_FRONT_LEFT 0
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,247 +0,0 @@
|
|||||||
From 13956bf0d47391046e7bb08bb0b581d0850738a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ken Martin <ken.martin@kitware.com>
|
|
||||||
Date: Tue, 23 Jun 2020 14:31:15 -0400
|
|
||||||
Subject: [PATCH] clean up some old opengl es stuff
|
|
||||||
|
|
||||||
No longer have the version option so remove
|
|
||||||
|
|
||||||
Partially implement 1D textures as 2D
|
|
||||||
---
|
|
||||||
Examples/Android/ReadMe.txt | 6 +-
|
|
||||||
Rendering/OpenGL2/CMakeLists.txt | 6 +-
|
|
||||||
Rendering/OpenGL2/vtkTextureObject.cxx | 95 +++++++++++++++++++++++++-
|
|
||||||
ThirdParty/glew/vtk_glew.h.in | 45 ++++++------
|
|
||||||
4 files changed, 118 insertions(+), 34 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Examples/Android/ReadMe.txt b/Examples/Android/ReadMe.txt
|
|
||||||
index 7b43476bdd..9c6f5a102d 100644
|
|
||||||
--- a/Examples/Android/ReadMe.txt
|
|
||||||
+++ b/Examples/Android/ReadMe.txt
|
|
||||||
@@ -41,10 +41,6 @@ To build VTK and these examples follow the steps below.
|
|
||||||
* Run cmake on vtkandroid with -DVTK_ANDROID_BUILD=ON, if you use the gui add a
|
|
||||||
* boolean entry with that name prior to configuring and set it on.
|
|
||||||
|
|
||||||
-If you want OpenGL ES 3.0 support make sure to change the setting of
|
|
||||||
-OPENGL_ES_VERSION to 3.0. Volume Rendering requires ES 3.0. Make sure to turn on
|
|
||||||
-VTK_BUILD_EXAMPLES
|
|
||||||
-
|
|
||||||
* configure and generate as usual
|
|
||||||
|
|
||||||
* Once done run ninja or make as appropriate
|
|
||||||
@@ -60,4 +56,4 @@ cd into CMakeExternals/Build/vtk-android/Examples/Android/ExampleName/bin
|
|
||||||
|
|
||||||
You should see some apk files in this directory.
|
|
||||||
|
|
||||||
-You can adb install -r ExampleName-debug.apk and then run the example on your device
|
|
||||||
\ No newline at end of file
|
|
||||||
+You can adb install -r ExampleName-debug.apk and then run the example on your device
|
|
||||||
diff --git a/Rendering/OpenGL2/CMakeLists.txt b/Rendering/OpenGL2/CMakeLists.txt
|
|
||||||
index da43adb85f..0ea0ee3200 100644
|
|
||||||
--- a/Rendering/OpenGL2/CMakeLists.txt
|
|
||||||
+++ b/Rendering/OpenGL2/CMakeLists.txt
|
|
||||||
@@ -3,6 +3,7 @@ set(classes
|
|
||||||
vtkClearRGBPass
|
|
||||||
vtkClearZPass
|
|
||||||
vtkCompositePolyDataMapper2
|
|
||||||
+ vtkDataTransferHelper
|
|
||||||
vtkDefaultPass
|
|
||||||
vtkDepthImageProcessingPass
|
|
||||||
vtkDepthOfFieldPass
|
|
||||||
@@ -93,11 +94,6 @@ set(classes
|
|
||||||
vtkValuePass
|
|
||||||
vtkVolumetricPass)
|
|
||||||
|
|
||||||
-if (NOT DEFINED OPENGL_ES_VERSION)
|
|
||||||
- list(APPEND classes
|
|
||||||
- vtkDataTransferHelper)
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
set(headers
|
|
||||||
vtkCompositePolyDataMapper2Internal.h
|
|
||||||
vtkOpenGL.h
|
|
||||||
vtkStateStorage.h
|
|
||||||
diff --git a/Rendering/OpenGL2/vtkTextureObject.cxx b/Rendering/OpenGL2/vtkTextureObject.cxx
|
|
||||||
index 6afef26d97..b491c62e89 100644
|
|
||||||
--- a/Rendering/OpenGL2/vtkTextureObject.cxx
|
|
||||||
+++ b/Rendering/OpenGL2/vtkTextureObject.cxx
|
|
||||||
@@ -1030,6 +1030,99 @@ bool vtkTextureObject::CreateTextureBuffer(
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
+// Emulate 1D textures as 2D. Note that the any shader code will likely
|
|
||||||
+// have to be modified as well for this to work.
|
|
||||||
+
|
|
||||||
+//------------------------------------------------------------------------------
|
|
||||||
+bool vtkTextureObject::Create1D(
|
|
||||||
+ int numComps, vtkPixelBufferObject* pbo, bool shaderSupportsTextureInt)
|
|
||||||
+{
|
|
||||||
+ assert(this->Context);
|
|
||||||
+ assert(pbo->GetContext() == this->Context.GetPointer());
|
|
||||||
+
|
|
||||||
+ GLenum target = GL_TEXTURE_2D;
|
|
||||||
+
|
|
||||||
+ // Now, determine texture parameters using the information from the pbo.
|
|
||||||
+
|
|
||||||
+ // * internalFormat depends on number of components and the data type.
|
|
||||||
+ GLenum internalFormat =
|
|
||||||
+ this->GetInternalFormat(pbo->GetType(), numComps, shaderSupportsTextureInt);
|
|
||||||
+
|
|
||||||
+ // * format depends on the number of components.
|
|
||||||
+ GLenum format = this->GetFormat(pbo->GetType(), numComps, shaderSupportsTextureInt);
|
|
||||||
+
|
|
||||||
+ // * type if the data type in the pbo
|
|
||||||
+ GLenum type = this->GetDefaultDataType(pbo->GetType());
|
|
||||||
+
|
|
||||||
+ if (!internalFormat || !format || !type)
|
|
||||||
+ {
|
|
||||||
+ vtkErrorMacro("Failed to determine texture parameters.");
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ this->Target = target;
|
|
||||||
+ this->Context->ActivateTexture(this);
|
|
||||||
+ this->CreateTexture();
|
|
||||||
+ this->Bind();
|
|
||||||
+
|
|
||||||
+ pbo->Bind(vtkPixelBufferObject::UNPACKED_BUFFER);
|
|
||||||
+
|
|
||||||
+ // Source texture data from the PBO.
|
|
||||||
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
|
||||||
+ glTexImage2D(target, 0, static_cast<GLint>(internalFormat),
|
|
||||||
+ static_cast<GLsizei>(pbo->GetSize() / static_cast<unsigned int>(numComps)), 1, 0, format, type,
|
|
||||||
+ BUFFER_OFFSET(0));
|
|
||||||
+ vtkOpenGLCheckErrorMacro("failed at glTexImage1D");
|
|
||||||
+ pbo->UnBind();
|
|
||||||
+ this->Deactivate();
|
|
||||||
+
|
|
||||||
+ this->Target = target;
|
|
||||||
+ this->Format = format;
|
|
||||||
+ this->Type = type;
|
|
||||||
+ this->Components = numComps;
|
|
||||||
+ this->Width = pbo->GetSize();
|
|
||||||
+ this->Height = 1;
|
|
||||||
+ this->Depth = 1;
|
|
||||||
+ this->NumberOfDimensions = 1;
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+//------------------------------------------------------------------------------
|
|
||||||
+bool vtkTextureObject::Create1DFromRaw(unsigned int width, int numComps, int dataType, void* data)
|
|
||||||
+{
|
|
||||||
+ assert(this->Context);
|
|
||||||
+
|
|
||||||
+ // Now determine the texture parameters using the arguments.
|
|
||||||
+ this->GetDataType(dataType);
|
|
||||||
+ this->GetInternalFormat(dataType, numComps, false);
|
|
||||||
+ this->GetFormat(dataType, numComps, false);
|
|
||||||
+
|
|
||||||
+ if (!this->InternalFormat || !this->Format || !this->Type)
|
|
||||||
+ {
|
|
||||||
+ vtkErrorMacro("Failed to determine texture parameters.");
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ GLenum target = GL_TEXTURE_2D;
|
|
||||||
+ this->Target = target;
|
|
||||||
+ this->Components = numComps;
|
|
||||||
+ this->Width = width;
|
|
||||||
+ this->Height = 1;
|
|
||||||
+ this->Depth = 1;
|
|
||||||
+ this->NumberOfDimensions = 1;
|
|
||||||
+ this->Context->ActivateTexture(this);
|
|
||||||
+ this->CreateTexture();
|
|
||||||
+ this->Bind();
|
|
||||||
+
|
|
||||||
+ glTexImage2D(this->Target, 0, this->InternalFormat, static_cast<GLsizei>(this->Width), 1, 0,
|
|
||||||
+ this->Format, this->Type, static_cast<const GLvoid*>(data));
|
|
||||||
+
|
|
||||||
+ vtkOpenGLCheckErrorMacro("failed at glTexImage1D");
|
|
||||||
+
|
|
||||||
+ this->Deactivate();
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
// Description:
|
|
||||||
// Create a texture buffer basically a 1D texture that can be
|
|
||||||
// very large for passing data into the fragment shader
|
|
||||||
@@ -1037,7 +1130,7 @@ bool vtkTextureObject::CreateTextureBuffer(
|
|
||||||
unsigned int numValues, int numComps, int dataType, vtkOpenGLBufferObject* bo)
|
|
||||||
{
|
|
||||||
assert(this->Context);
|
|
||||||
- vtkErrorMacro("TextureBuffers not supported in OPenGL ES");
|
|
||||||
+ vtkErrorMacro("TextureBuffers not supported in OpenGL ES");
|
|
||||||
// TODO: implement 1D and Texture buffers using 2D textures
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
diff --git a/ThirdParty/glew/vtk_glew.h.in b/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
index 6aa8c2ee9e..009f230b19 100644
|
|
||||||
--- a/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
+++ b/ThirdParty/glew/vtk_glew.h.in
|
|
||||||
@@ -35,42 +35,41 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if VTK_MODULE_vtkglew_GLES3
|
|
||||||
-# include <GLES3/gl3.h>
|
|
||||||
+#include <GLES3/gl3.h>
|
|
||||||
#elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
|
||||||
-# include <OpenGLES/ES3/gl.h>
|
|
||||||
+#include <OpenGLES/ES3/gl.h>
|
|
||||||
#elif VTK_MODULE_USE_EXTERNAL_vtkglew
|
|
||||||
-# include <GL/glew.h>
|
|
||||||
-# ifdef _WIN32
|
|
||||||
-# include <GL/wglew.h>
|
|
||||||
-# endif
|
|
||||||
+#include <GL/glew.h>
|
|
||||||
+#ifdef _WIN32
|
|
||||||
+#include <GL/wglew.h>
|
|
||||||
+#endif
|
|
||||||
#else
|
|
||||||
-# include <vtkglew/include/GL/glew.h>
|
|
||||||
-# ifdef _WIN32
|
|
||||||
-# include <vtkglew/include/GL/wglew.h>
|
|
||||||
-# endif
|
|
||||||
+#include <vtkglew/include/GL/glew.h>
|
|
||||||
+#ifdef _WIN32
|
|
||||||
+#include <vtkglew/include/GL/wglew.h>
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* some fixes for both ES 2 and 3 */
|
|
||||||
#ifdef GL_ES_VERSION_3_0
|
|
||||||
-# define glDrawBuffer(arg)
|
|
||||||
-# define GL_BACK_LEFT 0
|
|
||||||
-# define GL_BACK_RIGHT 0
|
|
||||||
-# define GL_FRONT_LEFT 0
|
|
||||||
-# define GL_FRONT_RIGHT 0
|
|
||||||
+#define glDrawBuffer(arg)
|
|
||||||
+#define GL_BACK_LEFT 0
|
|
||||||
+#define GL_BACK_RIGHT 0
|
|
||||||
+#define GL_FRONT_LEFT 0
|
|
||||||
+#define GL_FRONT_RIGHT 0
|
|
||||||
|
|
||||||
/* this sends all the data each time as opposed to allowing a subset */
|
|
||||||
-# define glMultiDrawElements(mode, counts, type, indicies, primcount) \
|
|
||||||
- for (size_t eCount = 0; eCount < primcount; ++eCount) \
|
|
||||||
- { \
|
|
||||||
- glDrawElements(mode, *(counts + eCount), \
|
|
||||||
- type, (GLvoid *)(indicies[eCount])); \
|
|
||||||
- }
|
|
||||||
+#define glMultiDrawElements(mode, counts, type, indicies, primcount) \
|
|
||||||
+ for (size_t eCount = 0; eCount < primcount; ++eCount) \
|
|
||||||
+ { \
|
|
||||||
+ glDrawElements(mode, *(counts + eCount), type, (GLvoid*)(indicies[eCount])); \
|
|
||||||
+ }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*** deal with some GLES 3.0 specific issues ***/
|
|
||||||
#ifdef GL_ES_VERSION_3_0
|
|
||||||
-# define GLEW_ARB_vertex_array_object 1
|
|
||||||
-# define GLEW_ARB_instanced_arrays 1
|
|
||||||
+#define GLEW_ARB_vertex_array_object 1
|
|
||||||
+#define GLEW_ARB_instanced_arrays 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 18b9e99bcc2550515e2f725f1b0c70904068c945 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ken Martin <ken.martin@kitware.com>
|
|
||||||
Date: Mon, 6 Jul 2020 10:48:40 -0400
|
|
||||||
Subject: [PATCH] expose 1d texture options
|
|
||||||
|
|
||||||
They are partially implemented as 2d textures
|
|
||||||
---
|
|
||||||
Rendering/OpenGL2/vtkTextureObject.h | 4 ----
|
|
||||||
1 file changed, 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Rendering/OpenGL2/vtkTextureObject.h b/Rendering/OpenGL2/vtkTextureObject.h
|
|
||||||
index b6dcdf6ba7..fe018c75f9 100644
|
|
||||||
--- a/Rendering/OpenGL2/vtkTextureObject.h
|
|
||||||
+++ b/Rendering/OpenGL2/vtkTextureObject.h
|
|
||||||
@@ -226,9 +226,6 @@ public:
|
|
||||||
bool CreateCubeFromRaw(
|
|
||||||
unsigned int width, unsigned int height, int numComps, int dataType, void* data[6]);
|
|
||||||
|
|
||||||
-// 1D textures are not supported in ES 2.0 or 3.0
|
|
||||||
-#ifndef GL_ES_VERSION_3_0
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* Create a 1D texture using the PBO.
|
|
||||||
* Eventually we may start supporting creating a texture from subset of data
|
|
||||||
@@ -245,7 +242,6 @@ public:
|
|
||||||
* Create 1D texture from client memory
|
|
||||||
*/
|
|
||||||
bool Create1DFromRaw(unsigned int width, int numComps, int dataType, void* data);
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a 2D texture using the PBO.
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
From f03ed2c663c30baac698d5b76a8ba4ea63776ce2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Fri, 17 Jul 2020 05:05:55 +0200
|
|
||||||
Subject: [PATCH 2/2] Guard GL_LINE_SMOOTH for GLES
|
|
||||||
|
|
||||||
---
|
|
||||||
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
|
||||||
index 7b834fa6e5..cc376934dd 100644
|
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
|
||||||
@@ -332,10 +332,12 @@ void vtkOpenGLContextDevice2D::Begin(vtkViewport* viewport)
|
|
||||||
this->RenderWindow->GetShaderCache()->ReleaseCurrentShader();
|
|
||||||
|
|
||||||
// Enable simple line smoothing if multisampling is on.
|
|
||||||
+#ifdef GL_LINE_SMOOTH
|
|
||||||
if (this->Renderer->GetRenderWindow()->GetMultiSamples())
|
|
||||||
{
|
|
||||||
glEnable(GL_LINE_SMOOTH);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
this->InRender = true;
|
|
||||||
vtkOpenGLCheckErrorMacro("failed after Begin");
|
|
||||||
@@ -359,10 +361,12 @@ void vtkOpenGLContextDevice2D::End()
|
|
||||||
this->Storage->RestoreGLState(ostate);
|
|
||||||
|
|
||||||
// Disable simple line smoothing if multisampling is on.
|
|
||||||
+#ifdef GL_LINE_SMOOTH
|
|
||||||
if (this->Renderer->GetRenderWindow()->GetMultiSamples())
|
|
||||||
{
|
|
||||||
glDisable(GL_LINE_SMOOTH);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
this->PolyDataImpl->HandleEndFrame();
|
|
||||||
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
From 651b3bae914b9f3c69031c97a366e5cf53ead389 Mon Sep 17 00:00:00 2001
|
From 068773541005f8d8f027b373a01c821788439c8b Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
Date: Thu, 16 Jul 2020 19:54:38 +0200
|
Date: Sun, 21 Nov 2021 22:51:36 +0100
|
||||||
Subject: [PATCH 2/2] Use GL_DRAW_BUFFER0 instead of GL_DRAW_BUFFER for GLES
|
Subject: [PATCH] Use GL_DRAW_BUFFER0 instead of GL_DRAW_BUFFER for GLES
|
||||||
compatibility
|
compatibility
|
||||||
|
|
||||||
ARB_draw_buffers is part of GL 2.0, so GL_DRAW_BUFFERS0 so it is always
|
ARB_draw_buffers is part of GL 2.0, so GL_DRAW_BUFFERS0 is always
|
||||||
available, and contrary to GL_DRAW_BUFFER it is also valid for GLES
|
available, and contrary to GL_DRAW_BUFFER it is also valid for GLES
|
||||||
(part of GLES 3 or as EXT_draw_buffers).
|
(part of GLES 3 or as EXT_draw_buffers).
|
||||||
|
|
||||||
@ -14,15 +14,15 @@ glDrawBuffer.
|
|||||||
At least with MESA, GL_DRAW_BUFFER and GL_DRAW_BUFFER0 always return the
|
At least with MESA, GL_DRAW_BUFFER and GL_DRAW_BUFFER0 always return the
|
||||||
same value. GL_DRAW_BUFFERn is also used in several places already.
|
same value. GL_DRAW_BUFFERn is also used in several places already.
|
||||||
---
|
---
|
||||||
.../ContextOpenGL2/vtkOpenGLContextBufferId.cxx | 2 +-
|
.../ContextOpenGL2/vtkOpenGLContextBufferId.cxx | 2 +-
|
||||||
.../vtkOpenGLContextDevice2DPrivate.h | 2 +-
|
.../ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h | 2 +-
|
||||||
.../External/vtkExternalOpenGLRenderWindow.cxx | 2 +-
|
Rendering/External/vtkExternalOpenGLRenderWindow.cxx | 2 +-
|
||||||
Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 12 ++++++------
|
Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 8 ++++----
|
||||||
Rendering/OpenGL2/vtkOpenGLState.cxx | 16 ++++++++--------
|
Rendering/OpenGL2/vtkOpenGLState.cxx | 12 ++++++------
|
||||||
5 files changed, 17 insertions(+), 17 deletions(-)
|
5 files changed, 13 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
||||||
index 06abb5e7e6..0d39638869 100644
|
index c0e0f8909f..dd6a93bde3 100644
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
|
||||||
@@ -139,7 +139,7 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y)
|
@@ -139,7 +139,7 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y)
|
||||||
@ -35,7 +35,7 @@ index 06abb5e7e6..0d39638869 100644
|
|||||||
vtkOpenGLState::ScopedglEnableDisable dsaver(ostate, GL_DEPTH_TEST);
|
vtkOpenGLState::ScopedglEnableDisable dsaver(ostate, GL_DEPTH_TEST);
|
||||||
vtkOpenGLState::ScopedglEnableDisable ssaver(ostate, GL_STENCIL_TEST);
|
vtkOpenGLState::ScopedglEnableDisable ssaver(ostate, GL_STENCIL_TEST);
|
||||||
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
||||||
index 5632547459..17e2f182ef 100644
|
index 29e5f47671..7acb87e25f 100644
|
||||||
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
||||||
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
|
||||||
@@ -309,7 +309,7 @@ public:
|
@@ -309,7 +309,7 @@ public:
|
||||||
@ -48,10 +48,10 @@ index 5632547459..17e2f182ef 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
diff --git a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
index c95b50ac64..291c4e1e61 100644
|
index 445bfce802..5e1f2f4b24 100644
|
||||||
--- a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
--- a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
+++ b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
+++ b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
|
||||||
@@ -60,7 +60,7 @@ void vtkExternalOpenGLRenderWindow::Start(void)
|
@@ -58,7 +58,7 @@ void vtkExternalOpenGLRenderWindow::Start()
|
||||||
|
|
||||||
// For stereo, render the correct eye based on the OpenGL buffer mode
|
// For stereo, render the correct eye based on the OpenGL buffer mode
|
||||||
GLint bufferType;
|
GLint bufferType;
|
||||||
@ -61,21 +61,10 @@ index c95b50ac64..291c4e1e61 100644
|
|||||||
vtkRenderer* renderer;
|
vtkRenderer* renderer;
|
||||||
for (this->GetRenderers()->InitTraversal(sit);
|
for (this->GetRenderers()->InitTraversal(sit);
|
||||||
diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
index 4bda9330b6..14cd43711f 100644
|
index 25b521bd0d..426aa69f08 100644
|
||||||
--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
+++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
+++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
|
||||||
@@ -533,8 +533,8 @@ bool vtkOpenGLRenderWindow::InitializeFromCurrentContext()
|
@@ -583,8 +583,8 @@ bool vtkOpenGLRenderWindow::GetUsingSRGBColorSpace()
|
||||||
{
|
|
||||||
this->DefaultFrameBufferId = frameBufferBinding;
|
|
||||||
GLint attachment = GL_COLOR_ATTACHMENT0;
|
|
||||||
-#ifdef GL_DRAW_BUFFER
|
|
||||||
- glGetIntegerv(GL_DRAW_BUFFER, &attachment);
|
|
||||||
+#ifdef GL_DRAW_BUFFER0
|
|
||||||
+ glGetIntegerv(GL_DRAW_BUFFER0, &attachment);
|
|
||||||
#endif
|
|
||||||
this->BackLeftBuffer = static_cast<unsigned int>(attachment);
|
|
||||||
this->FrontLeftBuffer = static_cast<unsigned int>(attachment);
|
|
||||||
@@ -660,8 +660,8 @@ bool vtkOpenGLRenderWindow::GetUsingSRGBColorSpace()
|
|
||||||
this->MakeCurrent();
|
this->MakeCurrent();
|
||||||
|
|
||||||
GLint attachment = GL_BACK_LEFT;
|
GLint attachment = GL_BACK_LEFT;
|
||||||
@ -86,7 +75,7 @@ index 4bda9330b6..14cd43711f 100644
|
|||||||
#endif
|
#endif
|
||||||
// GL seems odd with its handling of left/right.
|
// GL seems odd with its handling of left/right.
|
||||||
// if it says we are using GL_FRONT or GL_BACK
|
// if it says we are using GL_FRONT or GL_BACK
|
||||||
@@ -716,8 +716,8 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
|
@@ -639,8 +639,8 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
|
||||||
{
|
{
|
||||||
this->MakeCurrent();
|
this->MakeCurrent();
|
||||||
GLint attachment = GL_BACK_LEFT;
|
GLint attachment = GL_BACK_LEFT;
|
||||||
@ -98,10 +87,10 @@ index 4bda9330b6..14cd43711f 100644
|
|||||||
#ifdef GL_ES_VERSION_3_0
|
#ifdef GL_ES_VERSION_3_0
|
||||||
// GLES only has the GL_BACK color
|
// GLES only has the GL_BACK color
|
||||||
diff --git a/Rendering/OpenGL2/vtkOpenGLState.cxx b/Rendering/OpenGL2/vtkOpenGLState.cxx
|
diff --git a/Rendering/OpenGL2/vtkOpenGLState.cxx b/Rendering/OpenGL2/vtkOpenGLState.cxx
|
||||||
index 3822fe7bd0..dbec8329dd 100644
|
index 24f23a5c44..aca4e4f247 100644
|
||||||
--- a/Rendering/OpenGL2/vtkOpenGLState.cxx
|
--- a/Rendering/OpenGL2/vtkOpenGLState.cxx
|
||||||
+++ b/Rendering/OpenGL2/vtkOpenGLState.cxx
|
+++ b/Rendering/OpenGL2/vtkOpenGLState.cxx
|
||||||
@@ -205,8 +205,8 @@ void vtkOpenGLState::CheckState()
|
@@ -217,8 +217,8 @@ void vtkOpenGLState::CheckState()
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
unsigned int sval;
|
unsigned int sval;
|
||||||
@ -109,42 +98,31 @@ index 3822fe7bd0..dbec8329dd 100644
|
|||||||
- ::glGetIntegerv(GL_DRAW_BUFFER, iparams);
|
- ::glGetIntegerv(GL_DRAW_BUFFER, iparams);
|
||||||
+#ifdef GL_DRAW_BUFFER0
|
+#ifdef GL_DRAW_BUFFER0
|
||||||
+ ::glGetIntegerv(GL_DRAW_BUFFER0, iparams);
|
+ ::glGetIntegerv(GL_DRAW_BUFFER0, iparams);
|
||||||
sval = this->CurrentState.DrawBinding.GetDrawBuffer(0);
|
sval = cs.DrawBinding.GetDrawBuffer(0);
|
||||||
if (sval == GL_BACK_LEFT)
|
if (sval == GL_BACK_LEFT)
|
||||||
{
|
{
|
||||||
@@ -518,8 +518,8 @@ void vtkOpenGLState::vtkglBindFramebuffer(unsigned int target, unsigned int val)
|
@@ -504,8 +504,8 @@ void vtkOpenGLState::vtkglBindFramebuffer(unsigned int target, unsigned int val)
|
||||||
this->CurrentState.DrawBinding.Binding = val;
|
{
|
||||||
this->CurrentState.DrawBinding.Framebuffer = nullptr;
|
cs.DrawBinding.Binding = val;
|
||||||
::glBindFramebuffer(GL_DRAW_FRAMEBUFFER, val);
|
::glBindFramebuffer(GL_DRAW_FRAMEBUFFER, val);
|
||||||
-#ifdef GL_DRAW_BUFFER
|
-#ifdef GL_DRAW_BUFFER
|
||||||
- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&cs.DrawBinding.DrawBuffers[0]);
|
||||||
+#ifdef GL_DRAW_BUFFER0
|
+#ifdef GL_DRAW_BUFFER0
|
||||||
+ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
+ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&cs.DrawBinding.DrawBuffers[0]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1222,8 +1222,8 @@ void vtkOpenGLState::Initialize(vtkOpenGLRenderWindow*)
|
@@ -1626,8 +1626,8 @@ void vtkOpenGLState::ResetFramebufferBindings()
|
||||||
unsigned int vals[1];
|
|
||||||
vals[0] = this->CurrentState.DrawBinding.GetDrawBuffer(0);
|
|
||||||
::glDrawBuffers(1, vals);
|
|
||||||
-#ifdef GL_DRAW_BUFFER
|
|
||||||
- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
|
||||||
+#ifdef GL_DRAW_BUFFER0
|
|
||||||
+ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
|
||||||
#endif
|
|
||||||
::glReadBuffer(this->CurrentState.ReadBinding.GetReadBuffer());
|
|
||||||
::glGetIntegerv(GL_READ_BUFFER, (int*)&this->CurrentState.ReadBinding.ReadBuffer);
|
|
||||||
@@ -1232,8 +1232,8 @@ void vtkOpenGLState::Initialize(vtkOpenGLRenderWindow*)
|
|
||||||
void vtkOpenGLState::ResetFramebufferBindings()
|
|
||||||
{
|
{
|
||||||
::glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (int*)&this->CurrentState.DrawBinding.Binding);
|
auto& cs = this->Stack.top();
|
||||||
|
::glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (int*)&cs.DrawBinding.Binding);
|
||||||
-#ifdef GL_DRAW_BUFFER
|
-#ifdef GL_DRAW_BUFFER
|
||||||
- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&cs.DrawBinding.DrawBuffers[0]);
|
||||||
+#ifdef GL_DRAW_BUFFER0
|
+#ifdef GL_DRAW_BUFFER0
|
||||||
+ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]);
|
+ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&cs.DrawBinding.DrawBuffers[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
::glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (int*)&this->CurrentState.ReadBinding.Binding);
|
::glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (int*)&cs.ReadBinding.Binding);
|
||||||
--
|
--
|
||||||
2.27.0
|
2.33.1
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
|
|
||||||
size 34687900
|
|
3
VTK-9.1.0.tar.gz
Normal file
3
VTK-9.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96
|
||||||
|
size 47871165
|
@ -1,5 +1,5 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<package>openmpi</package>
|
|
||||||
<package>openmpi2</package>
|
<package>openmpi2</package>
|
||||||
<package>openmpi3</package>
|
<package>openmpi3</package>
|
||||||
|
<package>openmpi4</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
Index: VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Rendering/FreeType/vtkFreeTypeTools.cxx
|
|
||||||
+++ VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx
|
|
||||||
@@ -378,7 +378,7 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
-FT_CALLBACK_DEF(FT_Error)
|
|
||||||
+extern "C" FT_Error
|
|
||||||
vtkFreeTypeToolsFaceRequester(
|
|
||||||
FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)
|
|
||||||
{
|
|
||||||
Index: VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx
|
|
||||||
+++ VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx
|
|
||||||
@@ -26,10 +26,8 @@
|
|
||||||
|
|
||||||
vtkStandardNewMacro(vtkFontConfigFreeTypeTools);
|
|
||||||
|
|
||||||
-namespace
|
|
||||||
-{
|
|
||||||
// The FreeType face requester callback:
|
|
||||||
-FT_CALLBACK_DEF(FT_Error)
|
|
||||||
+extern "C" FT_Error
|
|
||||||
vtkFontConfigFreeTypeToolsFaceRequester(
|
|
||||||
FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)
|
|
||||||
{
|
|
||||||
@@ -71,7 +69,6 @@ vtkFontConfigFreeTypeToolsFaceRequester(
|
|
||||||
|
|
||||||
return static_cast<FT_Error>(0);
|
|
||||||
}
|
|
||||||
-} // end anon namespace
|
|
||||||
|
|
||||||
void vtkFontConfigFreeTypeTools::PrintSelf(ostream& os, vtkIndent indent)
|
|
||||||
{
|
|
@ -1,45 +0,0 @@
|
|||||||
Index: VTK-9.0.1/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/CMakeLists.txt
|
|
||||||
+++ VTK-9.0.1/CMakeLists.txt
|
|
||||||
@@ -48,6 +48,8 @@ include(vtkCMakeBackports)
|
|
||||||
|
|
||||||
if (VTK_WHEEL_BUILD)
|
|
||||||
include(vtkWheelPreparation)
|
|
||||||
+elseif(VTK_OPENSUSE_PYTHON_BUILD)
|
|
||||||
+ include(vtkPythonMetadataPrepare)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include(vtkCompilerChecks)
|
|
||||||
@@ -474,7 +476,7 @@ install(
|
|
||||||
|
|
||||||
# TODO: HeaderTest exclusions for memcheck.
|
|
||||||
|
|
||||||
-if (VTK_WHEEL_BUILD)
|
|
||||||
+if (VTK_WHEEL_BUILD OR VTK_OPENSUSE_PYTHON_BUILD)
|
|
||||||
include(vtkWheelFinalization)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
Index: VTK-9.0.1/CMake/vtkPythonMetadataPrepare.cmake
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ VTK-9.0.1/CMake/vtkPythonMetadataPrepare.cmake
|
|
||||||
@@ -0,0 +1,18 @@
|
|
||||||
+# copied from vtkWheelPrepare, but without forcing wheel specific options
|
|
||||||
+
|
|
||||||
+configure_file(
|
|
||||||
+ "${CMAKE_CURRENT_LIST_DIR}/setup.py.in"
|
|
||||||
+ "${CMAKE_BINARY_DIR}/setup.py"
|
|
||||||
+ @ONLY)
|
|
||||||
+configure_file(
|
|
||||||
+ "${CMAKE_CURRENT_LIST_DIR}/MANIFEST.in.in"
|
|
||||||
+ "${CMAKE_BINARY_DIR}/MANIFEST.in"
|
|
||||||
+ @ONLY)
|
|
||||||
+configure_file(
|
|
||||||
+ "${CMAKE_SOURCE_DIR}/Copyright.txt"
|
|
||||||
+ "${CMAKE_BINARY_DIR}/LICENSE"
|
|
||||||
+ COPYONLY)
|
|
||||||
+configure_file(
|
|
||||||
+ "${CMAKE_SOURCE_DIR}/README.md"
|
|
||||||
+ "${CMAKE_BINARY_DIR}/README.md"
|
|
||||||
+ COPYONLY)
|
|
@ -1,70 +0,0 @@
|
|||||||
From c7d6a8d81367a4ed92163c059aa3181386eabc24 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ben Boeckel <ben.boeckel@kitware.com>
|
|
||||||
Date: Mon, 3 May 2021 11:55:27 -0400
|
|
||||||
Subject: [PATCH] vtkDataArrayPrivate: include <limits> for std::numeric_limits
|
|
||||||
|
|
||||||
See: #18194
|
|
||||||
---
|
|
||||||
Common/Core/vtkDataArrayPrivate.txx | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
Index: VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Common/Core/vtkDataArrayPrivate.txx
|
|
||||||
+++ VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include <algorithm>
|
|
||||||
#include <array>
|
|
||||||
#include <cassert> // for assert()
|
|
||||||
+#include <limits>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace vtkDataArrayPrivate
|
|
||||||
Index: VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Common/Core/vtkGenericDataArrayLookupHelper.h
|
|
||||||
+++ VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "vtkIdList.h"
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
+#include <limits>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
Index: VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Common/DataModel/vtkPiecewiseFunction.cxx
|
|
||||||
+++ VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#include <cassert>
|
|
||||||
#include <cmath>
|
|
||||||
#include <iterator>
|
|
||||||
+#include <limits>
|
|
||||||
#include <set>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
Index: VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
|
|
||||||
+++ VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include "vtkHyperTreeGridNonOrientedCursor.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
+#include <limits>
|
|
||||||
|
|
||||||
vtkStandardNewMacro(vtkHyperTreeGridThreshold);
|
|
||||||
|
|
||||||
Index: VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
|
|
||||||
===================================================================
|
|
||||||
--- VTK-9.0.1.orig/Rendering/Core/vtkColorTransferFunction.cxx
|
|
||||||
+++ VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <iterator>
|
|
||||||
+#include <limits>
|
|
||||||
#include <set>
|
|
||||||
#include <vector>
|
|
||||||
|
|
30
vtk.changes
30
vtk.changes
@ -1,3 +1,33 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 18 04:03:36 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Update to version 9.1.0, see:
|
||||||
|
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.1.md
|
||||||
|
- Drop upstream patches:
|
||||||
|
+ 0001-clean-up-some-old-opengl-es-stuff.patch
|
||||||
|
+ 0001-expose-1d-texture-options.patch
|
||||||
|
+ 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch
|
||||||
|
+ 0001-Allow-compilation-on-GLES-platforms.patch
|
||||||
|
+ 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch
|
||||||
|
+ 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch
|
||||||
|
+ 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch
|
||||||
|
+ 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch
|
||||||
|
+ 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch
|
||||||
|
+ vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch
|
||||||
|
+ vtk-std_numeric_limits.patch
|
||||||
|
- Rebase:
|
||||||
|
+ 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch
|
||||||
|
+ 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch
|
||||||
|
+ 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
|
||||||
|
- Replace openSUSE python hack with upstreamable solution:
|
||||||
|
+ vtk-opensuse-python-metadata.patch ->
|
||||||
|
0001-Always-generate-Python-Metadata-when-WRAP_PYTHON-is-.patch,
|
||||||
|
0001-Consider-VTK_PYTHON_SITE_PACKAGES_SUFFIX-for-Python-.patch
|
||||||
|
- Add:
|
||||||
|
+ 0001-Add-missing-libm-link-library-to-kissfft-module.patch
|
||||||
|
- Remove Leap 15.1 support from specfile
|
||||||
|
- Remove openmpi1 flavor, add openmpi4
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jun 19 21:04:19 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Sat Jun 19 21:04:19 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
124
vtk.spec
124
vtk.spec
@ -21,13 +21,6 @@
|
|||||||
%bcond_with examples
|
%bcond_with examples
|
||||||
%bcond_with documentation
|
%bcond_with documentation
|
||||||
|
|
||||||
%if 0%{?sle_version} >= 150200
|
|
||||||
%define DisOMPI1 ExclusiveArch: do_not_build
|
|
||||||
%endif
|
|
||||||
%if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150200
|
|
||||||
%define DisOMPI3 ExclusiveArch: do_not_build
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch %arm aarch64
|
%ifarch %arm aarch64
|
||||||
%bcond_without gles
|
%bcond_without gles
|
||||||
%else
|
%else
|
||||||
@ -45,15 +38,8 @@
|
|||||||
%bcond_without gl2ps
|
%bcond_without gl2ps
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# pegtl in Leap 15.1 is too old (< 2.0.0)
|
|
||||||
# JAVA bindings fail to build
|
|
||||||
%if 0%{?sle_version} == 150100
|
|
||||||
%bcond_with java
|
|
||||||
%bcond_with pegtl
|
|
||||||
%else
|
|
||||||
%bcond_without java
|
%bcond_without java
|
||||||
%bcond_without pegtl
|
%bcond_without pegtl
|
||||||
%endif
|
|
||||||
|
|
||||||
# Need patched version with HPDF_SHADING
|
# Need patched version with HPDF_SHADING
|
||||||
%bcond_with haru
|
%bcond_with haru
|
||||||
@ -67,18 +53,6 @@
|
|||||||
%define my_datadir %_datadir
|
%define my_datadir %_datadir
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{flavor}" == "openmpi"
|
|
||||||
%{?DisOMPI1}
|
|
||||||
%if 0%{?suse_version} >= 1550
|
|
||||||
%define my_suffix -openmpi1
|
|
||||||
%define mpi_flavor openmpi1
|
|
||||||
%else
|
|
||||||
%define my_suffix -openmpi
|
|
||||||
%define mpi_flavor openmpi
|
|
||||||
%endif
|
|
||||||
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_flavor}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if "%{flavor}" == "openmpi2"
|
%if "%{flavor}" == "openmpi2"
|
||||||
%define my_suffix -openmpi2
|
%define my_suffix -openmpi2
|
||||||
%define mpi_flavor openmpi2
|
%define mpi_flavor openmpi2
|
||||||
@ -92,6 +66,13 @@
|
|||||||
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_flavor}
|
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_flavor}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "openmpi4"
|
||||||
|
%{?DisOMPI4}
|
||||||
|
%define my_suffix -openmpi4
|
||||||
|
%define mpi_flavor openmpi4
|
||||||
|
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_flavor}
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}}
|
%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}}
|
||||||
|
|
||||||
%if %{with mpi}
|
%if %{with mpi}
|
||||||
@ -106,9 +87,9 @@
|
|||||||
%define shlib %{vtklib}
|
%define shlib %{vtklib}
|
||||||
|
|
||||||
Name: vtk%{?my_suffix}
|
Name: vtk%{?my_suffix}
|
||||||
Version: 9.0.1
|
Version: 9.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
%define series 9.0
|
%define series 9.1
|
||||||
Summary: The Visualization Toolkit - A high level 3D visualization library
|
Summary: The Visualization Toolkit - A high level 3D visualization library
|
||||||
# This is a variant BSD license, a cross between BSD and ZLIB.
|
# This is a variant BSD license, a cross between BSD and ZLIB.
|
||||||
# For all intents, it has the same rights and restrictions as BSD.
|
# For all intents, it has the same rights and restrictions as BSD.
|
||||||
@ -122,16 +103,6 @@ Source: https://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.g
|
|||||||
Source99: vtk-rpmlintrc
|
Source99: vtk-rpmlintrc
|
||||||
# PATCH-FIX-OPENSUSE bundled_libharu_add_missing_libm.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (gh#libharu/libharu#213)
|
# PATCH-FIX-OPENSUSE bundled_libharu_add_missing_libm.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (gh#libharu/libharu#213)
|
||||||
Patch1: bundled_libharu_add_missing_libm.patch
|
Patch1: bundled_libharu_add_missing_libm.patch
|
||||||
# PATCH-FIX-UPSTREAM
|
|
||||||
Patch2: 0001-clean-up-some-old-opengl-es-stuff.patch
|
|
||||||
# PATCH-FIX-UPSTREAM
|
|
||||||
Patch3: 0001-expose-1d-texture-options.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- prep for GLES patch, VTK issue #17113 stefan.bruens@rwth-aachen.de
|
|
||||||
Patch4: 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch
|
|
||||||
# PATCH-FIX-UPSTREAM 0001-Allow-compilation-on-GLES-platforms.patch VTK issue #17113 stefan.bruens@rwth-aachen.de -- Fix building with Qt GLES builds
|
|
||||||
Patch5: 0001-Allow-compilation-on-GLES-platforms.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds
|
|
||||||
Patch6: 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch
|
|
||||||
# PATCH-FIX-OPENSUSE -- Fix building with Qt GLES builds
|
# PATCH-FIX-OPENSUSE -- Fix building with Qt GLES builds
|
||||||
Patch7: 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch
|
Patch7: 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch
|
||||||
# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds
|
# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds
|
||||||
@ -140,23 +111,16 @@ Patch8: 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch
|
|||||||
Patch9: 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch
|
Patch9: 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-UPSTREAM
|
||||||
Patch10: 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
|
Patch10: 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
|
||||||
# PATCH-FIX-OPENSUSE -- GLES - Does no longer apply to upstream code
|
# PATCH-FIX-UPSTREAM -- Always create python package metadata (egg-info)
|
||||||
Patch11: 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch
|
Patch17: 0001-Always-generate-Python-Metadata-when-WRAP_PYTHON-is-.patch
|
||||||
|
# PATCH-FIX-UPSTREAM -- Copy generated metadata to the right directory
|
||||||
|
Patch18: 0001-Consider-VTK_PYTHON_SITE_PACKAGES_SUFFIX-for-Python-.patch
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-UPSTREAM
|
||||||
Patch12: 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch
|
Patch19: 0001-Add-missing-libm-link-library-to-kissfft-module.patch
|
||||||
# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7098
|
|
||||||
Patch13: 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7115
|
|
||||||
Patch14: 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/issues/18033
|
|
||||||
Patch15: vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/issues/18194
|
|
||||||
Patch16: vtk-std_numeric_limits.patch
|
|
||||||
# PATCH-FIX-OPENSUSE -- create python package metadata (egg-info) despite not building a wheel
|
|
||||||
Patch17: vtk-opensuse-python-metadata.patch
|
|
||||||
BuildRequires: R-base-devel
|
BuildRequires: R-base-devel
|
||||||
|
BuildRequires: cgns-devel
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: cmake >= 3.4
|
BuildRequires: cmake >= 3.12
|
||||||
BuildRequires: double-conversion-devel
|
BuildRequires: double-conversion-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -177,9 +141,9 @@ BuildRequires: pkgconfig(Qt5OpenGL)
|
|||||||
BuildRequires: pkgconfig(Qt5OpenGLExtensions)
|
BuildRequires: pkgconfig(Qt5OpenGLExtensions)
|
||||||
BuildRequires: pkgconfig(Qt5Sql)
|
BuildRequires: pkgconfig(Qt5Sql)
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
BuildRequires: pkgconfig(eigen3) >= 2.91.0
|
BuildRequires: pkgconfig(eigen3) >= 3.3.9
|
||||||
BuildRequires: pkgconfig(expat)
|
BuildRequires: pkgconfig(expat)
|
||||||
BuildRequires: pkgconfig(freetype2)
|
BuildRequires: pkgconfig(freetype2) >= 2.11.0
|
||||||
BuildRequires: pkgconfig(gl)
|
BuildRequires: pkgconfig(gl)
|
||||||
BuildRequires: pkgconfig(glew)
|
BuildRequires: pkgconfig(glew)
|
||||||
BuildRequires: pkgconfig(jsoncpp)
|
BuildRequires: pkgconfig(jsoncpp)
|
||||||
@ -188,7 +152,7 @@ BuildRequires: pkgconfig(libavdevice)
|
|||||||
BuildRequires: pkgconfig(libavformat)
|
BuildRequires: pkgconfig(libavformat)
|
||||||
BuildRequires: pkgconfig(libavutil)
|
BuildRequires: pkgconfig(libavutil)
|
||||||
BuildRequires: pkgconfig(libiodbc)
|
BuildRequires: pkgconfig(libiodbc)
|
||||||
BuildRequires: pkgconfig(liblz4) >= 1.7.3
|
BuildRequires: pkgconfig(liblz4) >= 1.8.0
|
||||||
BuildRequires: pkgconfig(libpng)
|
BuildRequires: pkgconfig(libpng)
|
||||||
BuildRequires: pkgconfig(libswscale)
|
BuildRequires: pkgconfig(libswscale)
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
@ -398,24 +362,15 @@ languages.
|
|||||||
%prep
|
%prep
|
||||||
%setup -n VTK-%{version}
|
%setup -n VTK-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%if %{with gles}
|
%if %{with gles}
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%endif
|
%endif
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
%patch17 -p1
|
||||||
|
%patch18 -p1
|
||||||
|
%patch19 -p1
|
||||||
|
|
||||||
# Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata
|
# Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata
|
||||||
# otherwise it will break on symlinks.
|
# otherwise it will break on symlinks.
|
||||||
@ -436,13 +391,12 @@ export CXXFLAGS="%{optflags}"
|
|||||||
|
|
||||||
# The %%cmake macro sets CMAKE_SKIP_RPATH=ON for Leap 15.x which causes build failures
|
# The %%cmake macro sets CMAKE_SKIP_RPATH=ON for Leap 15.x which causes build failures
|
||||||
# https://discourse.vtk.org/t/building-fails-generating-wrap-hierarchy-for-vtk-commoncore-unable-to-open-libvtkwrappingtools-so-1
|
# https://discourse.vtk.org/t/building-fails-generating-wrap-hierarchy-for-vtk-commoncore-unable-to-open-libvtkwrappingtools-so-1
|
||||||
# -DOpenGL_GL_PREFERENCE:STRING='LEGACY' - see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6946#note_767329
|
# Disable ioss module for MPI flavors, fails to build with 9.1.0, see MR 8565.
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \
|
-DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \
|
||||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
||||||
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{series} \
|
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{series} \
|
||||||
-DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib} \
|
-DCMAKE_INSTALL_QMLDIR:PATH=%{my_libdir}/qt5/qml \
|
||||||
-DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \
|
|
||||||
-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \
|
-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \
|
||||||
-DVTK_BUILD_TESTING:BOOL=ON \
|
-DVTK_BUILD_TESTING:BOOL=ON \
|
||||||
-DVTK_BUILD_EXAMPLES:BOOL=%{?with_examples:ON}%{!?with_examples:OFF} \
|
-DVTK_BUILD_EXAMPLES:BOOL=%{?with_examples:ON}%{!?with_examples:OFF} \
|
||||||
@ -469,20 +423,21 @@ export CXXFLAGS="%{optflags}"
|
|||||||
-DVTK_GROUP_ENABLE_StandAlone=WANT \
|
-DVTK_GROUP_ENABLE_StandAlone=WANT \
|
||||||
-DVTK_GROUP_ENABLE_Views=WANT \
|
-DVTK_GROUP_ENABLE_Views=WANT \
|
||||||
-DVTK_PYTHON_VERSION=3 \
|
-DVTK_PYTHON_VERSION=3 \
|
||||||
-DVTK_OPENSUSE_PYTHON_BUILD:BOOL=ON \
|
|
||||||
-DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \
|
|
||||||
-DJava_JAVAH_EXECUTABLE=%{_bindir}/true \
|
|
||||||
-DVTK_WRAP_JAVA:BOOL=%{?with_java:ON}%{!?with_java:OFF} \
|
-DVTK_WRAP_JAVA:BOOL=%{?with_java:ON}%{!?with_java:OFF} \
|
||||||
-DVTK_WRAP_PYTHON:BOOL=ON \
|
-DVTK_WRAP_PYTHON:BOOL=ON \
|
||||||
-DVTK_USE_EXTERNAL:BOOL=ON \
|
|
||||||
-DOpenGL_GL_PREFERENCE:STRING='GLVND' \
|
-DOpenGL_GL_PREFERENCE:STRING='GLVND' \
|
||||||
-DVTK_OPENGL_USE_GLES:BOOL=%{?with_gles:ON}%{!?with_gles:OFF} \
|
-DVTK_OPENGL_USE_GLES:BOOL=%{?with_gles:ON}%{!?with_gles:OFF} \
|
||||||
|
-DVTK_USE_EXTERNAL:BOOL=ON \
|
||||||
|
-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk:BOOL=OFF \
|
||||||
|
-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=OFF \
|
||||||
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \
|
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \
|
||||||
|
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss:BOOL=OFF \
|
||||||
-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \
|
-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \
|
||||||
-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \
|
-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \
|
||||||
-DVTK_MODULE_ENABLE_VTK_pegtl=%{?with_pegtl:YES}%{!?with_pegtl:NO}
|
-DVTK_MODULE_ENABLE_VTK_ioss:BOOL=%{!?with_mpi:WANT}%{?with_mpi:NO} \
|
||||||
|
-DVTK_MODULE_ENABLE_VTK_pegtl=%{?with_pegtl:YES}%{!?with_pegtl:NO} \
|
||||||
#-DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \
|
-DVTK_MODULE_ENABLE_VTK_zfp:BOOL=NO \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
@ -551,16 +506,13 @@ mkdir -p %{buildroot}%{_licensedir}
|
|||||||
mv %{buildroot}%{my_datadir}/licenses/VTK %{buildroot}%{_licensedir}/%{name}
|
mv %{buildroot}%{my_datadir}/licenses/VTK %{buildroot}%{_licensedir}/%{name}
|
||||||
|
|
||||||
%if ! %{with mpi}
|
%if ! %{with mpi}
|
||||||
# install python distribution metadata despite not building a wheel
|
# Generate and install python distribution metadata
|
||||||
buildsitearch=%{python3_sitearch}
|
pushd build/%{_lib}/python%{python3_version}/site-packages/
|
||||||
buildsitearch=${buildsitearch/\/usr/build}
|
|
||||||
cp build/{setup.py,README.md,MANIFEST.in,requirements.txt,vtk_features.py} ${buildsitearch}/
|
|
||||||
pushd ${buildsitearch}
|
|
||||||
python3 setup.py install_egg_info -d %{buildroot}%{python3_sitearch}
|
python3 setup.py install_egg_info -d %{buildroot}%{python3_sitearch}
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%fdupes -s %{buildroot}
|
%fdupes %{buildroot}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Make sure the python library is at least importable
|
# Make sure the python library is at least importable
|
||||||
@ -572,7 +524,7 @@ export PYTHONPATH=$_PYTHON_MPI_PREFIX:$PYTHONPATH
|
|||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{my_libdir}
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{my_libdir}
|
||||||
export PYTHONPATH=$PYTHONPATH:%{buildroot}%{python3_sitearch}
|
export PYTHONPATH=$PYTHONPATH:%{buildroot}%{python3_sitearch}
|
||||||
python3 -c "import vtk"
|
python3 -c "import vtk"
|
||||||
find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time-based .pyc file
|
find %{buildroot} . -name vtk.cpython-3*.pyc -print -delete # drop unreproducible time-based .pyc file
|
||||||
|
|
||||||
%post -n %{shlib} -p /sbin/ldconfig
|
%post -n %{shlib} -p /sbin/ldconfig
|
||||||
%postun -n %{shlib} -p /sbin/ldconfig
|
%postun -n %{shlib} -p /sbin/ldconfig
|
||||||
@ -641,6 +593,12 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time-
|
|||||||
%files qt
|
%files qt
|
||||||
%license Copyright.txt
|
%license Copyright.txt
|
||||||
%{my_libdir}/libvtk*Qt*.so.*
|
%{my_libdir}/libvtk*Qt*.so.*
|
||||||
|
%if %{with mpi}
|
||||||
|
%dir %{my_libdir}/qt5
|
||||||
|
%{my_libdir}/qt5/qml
|
||||||
|
%else
|
||||||
|
%{_libqt5_archdatadir}/qml
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with examples}
|
%if %{with examples}
|
||||||
%if "%{flavor}" == ""
|
%if "%{flavor}" == ""
|
||||||
|
Loading…
Reference in New Issue
Block a user