SHA256
1
0
forked from pool/vtk

Accepting request 1135723 from science

OBS-URL: https://build.opensuse.org/request/show/1135723
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vtk?expand=0&rev=60
This commit is contained in:
Dominique Leuenberger 2024-01-03 11:25:09 +00:00 committed by Git OBS Bridge
commit 005dda96e9
11 changed files with 89 additions and 119 deletions

View File

@ -80,23 +80,6 @@ index 46064d3360..f5b7f6f0c3 100644
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.33.1

View File

@ -15,7 +15,7 @@ diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtk
index 9bbbc2ba54..4bda9330b6 100644
--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
+++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
@@ -719,6 +719,10 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
@@ -849,6 +849,10 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
#ifdef GL_DRAW_BUFFER
glGetIntegerv(GL_DRAW_BUFFER, &attachment);
#endif
@ -26,7 +26,7 @@ index 9bbbc2ba54..4bda9330b6 100644
// GL seems odd with its handling of left/right.
// if it says we are using GL_FRONT or GL_BACK
// then convert those to GL_FRONT_LEFT and
@@ -731,6 +735,7 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
@@ -861,6 +865,7 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
{
attachment = GL_BACK_LEFT;
}

View File

@ -1,44 +0,0 @@
From f65cf376980777639ac5ef52364678c87f1a721f 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 22:55:13 +0100
Subject: [PATCH] GL_POINT_SPRITE is only available for Compatibility Profiles
and GLES 1.0
---
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
index d30d61af5e..5a942bfda3 100644
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
@@ -1123,20 +1123,26 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(
}
// We can actually use point sprites here
+#ifdef GL_POINT_SPRITE
if (this->RenderWindow->IsPointSpriteBugPresent())
{
glEnable(GL_POINT_SPRITE);
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
}
+#endif
+#ifdef GL_POINT_SPRITE_COORD_ORIGIN
glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);
+#endif
glDrawArrays(GL_POINTS, 0, n);
+#ifdef GL_POINT_SPRITE
if (this->RenderWindow->IsPointSpriteBugPresent())
{
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE);
glDisable(GL_POINT_SPRITE);
}
+#endif
if (sprite)
{
--
2.33.1

View File

@ -25,28 +25,32 @@ diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx b/Rendering/C
index c0e0f8909f..dd6a93bde3 100644
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx
@@ -139,7 +139,7 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y)
// Render texture to current write buffer. Texel x,y is rendered at
@@ -130,8 +130,8 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y)
// pixel x,y (instead of pixel 0,0 to work around pixel ownership test).
GLint savedDrawBuffer;
GLint savedDrawBuffer = GL_BACK_LEFT;
-#ifdef GL_DRAW_BUFFER
- glGetIntegerv(GL_DRAW_BUFFER, &savedDrawBuffer);
+#ifdef GL_DRAW_BUFFER0
+ glGetIntegerv(GL_DRAW_BUFFER0, &savedDrawBuffer);
#endif
vtkOpenGLState::ScopedglEnableDisable dsaver(ostate, GL_DEPTH_TEST);
vtkOpenGLState::ScopedglEnableDisable ssaver(ostate, GL_STENCIL_TEST);
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
index 29e5f47671..7acb87e25f 100644
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h
@@ -309,7 +309,7 @@ public:
this->SavedStencilTest = ostate->GetEnumState(GL_STENCIL_TEST);
@@ -306,8 +306,8 @@ public:
this->SavedBlend = ostate->GetEnumState(GL_BLEND);
ostate->vtkglGetFloatv(GL_COLOR_CLEAR_VALUE, this->SavedClearColor);
- ostate->vtkglGetIntegerv(GL_DRAW_BUFFER, &this->SavedDrawBuffer);
+ ostate->vtkglGetIntegerv(GL_DRAW_BUFFER0, &this->SavedDrawBuffer);
}
}
-#ifdef GL_DRAW_BUFFER
- ostate->vtkglGetIntegerv(GL_DRAW_BUFFER, &this->SavedDrawBuffer);
+#ifdef GL_DRAW_BUFFER0
+ ostate->vtkglGetIntegerv(GL_DRAW_BUFFER0, &this->SavedDrawBuffer);
#else
this->SavedDrawBuffer = GL_BACK_LEFT;
#endif
diff --git a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
index 445bfce802..5e1f2f4b24 100644
--- a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx
@ -64,7 +68,7 @@ diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtk
index 25b521bd0d..426aa69f08 100644
--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
+++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
@@ -583,8 +583,8 @@ bool vtkOpenGLRenderWindow::GetUsingSRGBColorSpace()
@@ -794,8 +794,8 @@ bool vtkOpenGLRenderWindow::GetUsingSRGBColorSpace()
this->MakeCurrent();
GLint attachment = GL_BACK_LEFT;
@ -75,7 +79,7 @@ index 25b521bd0d..426aa69f08 100644
#endif
// GL seems odd with its handling of left/right.
// if it says we are using GL_FRONT or GL_BACK
@@ -639,8 +639,8 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
@@ -854,8 +854,8 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba)
{
this->MakeCurrent();
GLint attachment = GL_BACK_LEFT;

View File

@ -0,0 +1,16 @@
--- a/Rendering/CellGrid/vtkDGOpenGLRenderer.cxx_orig 2023-12-28 06:22:40.696501865 +0100
+++ b/Rendering/CellGrid/vtkDGOpenGLRenderer.cxx 2023-12-28 06:23:24.633470522 +0100
@@ -1046,11 +1046,13 @@
}
// III. Render draw
+#ifndef GL_ES_VERSION_3_0
if (renderer->GetUseImageBasedLighting() && renderer->GetEnvironmentTexture())
{
vtkOpenGLState* ostate = oglRenWin->GetState();
ostate->vtkglEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
}
+#endif
// a. Update shaders
state->CellBO.VAO->Bind();
// state->LastBoundBO = &state->CellBO; // We only bind the one...

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12
size 53810904

3
VTK-9.3.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9
size 99932810

View File

@ -1,34 +0,0 @@
From b1a09529f3ab381494f3eecb53b2ce4adc5b55e9 Mon Sep 17 00:00:00 2001
From: Laurent Rineau <laurent.rineau@cgal.org>
Date: Tue, 17 Jan 2023 16:18:53 +0100
Subject: [PATCH] Add #include <cstdint> to compile with gcc13
The `vtkSEPReader` was introduced by MRs !4909 (from my former
collaborator Maxime) and !4938. Then it was highly modified by
!7516. The later MR is the one that introduced the uses of
`std::uint8_t` and `std::uint32_t`.
Those types needs the inclusion of `<cstdint>`.
---
IO/Image/vtkSEPReader.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/IO/Image/vtkSEPReader.h b/IO/Image/vtkSEPReader.h
index 83d127a41e4..b9110780f26 100644
--- a/IO/Image/vtkSEPReader.h
+++ b/IO/Image/vtkSEPReader.h
@@ -25,8 +25,9 @@
#include "vtkImageAlgorithm.h"
#include "vtkNew.h" // for ivars
-#include <array> // for std::array
-#include <string> // for std::string
+#include <array> // for std::array
+#include <cstdint> // for std::uint8_t and std::uint32_t
+#include <string> // for std::string
namespace details
{
--
GitLab

View File

@ -0,0 +1,18 @@
--- a/Rendering/LICOpenGL2/vtk.module_orig 2023-12-27 17:36:03.966016939 +0100
+++ b/Rendering/LICOpenGL2/vtk.module 2023-12-27 17:36:40.199591808 +0100
@@ -14,6 +14,7 @@
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::RenderingOpenGL2
+ VTK::RenderingCore
PRIVATE_DEPENDS
VTK::CommonMath
VTK::CommonSystem
@@ -22,7 +23,6 @@
VTK::IOXML
VTK::ImagingCore
VTK::ImagingSources
- VTK::RenderingCore
VTK::glew
VTK::opengl
VTK::vtksys

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Dec 28 05:28:42 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to version 9.3.0, see:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.3.md
- Drop upstream patches:
* add add_missing_cstdint.patch
* 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
- Rebase:
* 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch
- Add patches:
* fix_rendering_core_linkage.patch
* Do-not-request-CUBE_MAP_SEAMLESS-on-GLES.patch
-------------------------------------------------------------------
Tue Oct 31 22:56:50 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@ -35,11 +35,17 @@
# Need haru/hpdf version with HPDF_SHADING, i.e. >= 2.4.0
# PEGTL >= 3.0 not supported, https://gitlab.kitware.com/vtk/vtk/-/issues/18151
%if 0%{?suse_version} <= 1500
%bcond_with fast_float
%bcond_with fmt
%bcond_with haru
%if 0%{?sle_version} <= 150400
%bcond_without pegtl
%else
%bcond_with pegtl
%endif
%bcond_with pugixml
%else
%bcond_without fast_float
%bcond_without fmt
%bcond_without haru
%bcond_with pegtl
@ -86,9 +92,9 @@
%define shlib %{vtklib}
Name: vtk%{?my_suffix}
Version: 9.2.6
Version: 9.3.0
Release: 0
%define series 9.2
%define series 9.3
Summary: The Visualization Toolkit - A high level 3D visualization library
# This is a variant BSD license, a cross between BSD and ZLIB.
# For all intents, it has the same rights and restrictions as BSD.
@ -102,20 +108,20 @@ Source: https://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.g
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)
Patch1: bundled_libharu_add_missing_libm.patch
# PATCH-FIX-UPSTREAM
Patch2: fix_rendering_core_linkage.patch
# PATCH-FIX-OPENSUSE -- Fix building with Qt GLES builds
Patch7: 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch
# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds
Patch8: 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch
# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds
Patch9: 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch
# PATCH-FIX-UPSTREAM
Patch10: 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch
# PATCH-FIX-OPENSUSE -- Fix building with Qt GLES builds
Patch10: Do-not-request-CUBE_MAP_SEAMLESS-on-GLES.patch
# PATCH-FIX-UPSTREAM -- Always create python package metadata (egg-info)
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 -- Add missing cstdint header required by GCC 13
Patch19: https://gitlab.kitware.com/vtk/vtk/-/commit/b1a09529f3ab.patch#/add_missing_cstdint.patch
BuildRequires: cgns-devel
BuildRequires: chrpath
BuildRequires: cmake >= 3.12
@ -186,6 +192,9 @@ BuildRequires: libboost_mpi-devel
BuildRequires: netcdf-%{mpi_flavor}-devel
BuildRequires: python3-mpi4py-devel
%endif
%if %{with fast_float}
BuildRequires: cmake(FastFloat)
%endif
%if %{with pugixml}
BuildRequires: pkgconfig(pugixml) >= 1.11
%endif
@ -387,6 +396,7 @@ languages.
%prep
%setup -n VTK-%{version}
%patch1 -p1
%patch2 -p1
%if %{with gles}
%patch7 -p1
%patch8 -p1
@ -395,7 +405,6 @@ languages.
%endif
%patch17 -p1
%patch18 -p1
%patch19 -p1
# Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata
# otherwise it will break on symlinks.
@ -407,6 +416,9 @@ sed -i -e '/set(vtk_sqlite_build_binary 1)/ s/.*/#\0/' CMakeLists.txt
# Allow testing also without external downloads - https://gitlab.kitware.com/vtk/vtk/-/issues/18692
sed -i -e '/set(vtk_enable_tests "OFF")/ s/.*/#\0/' CMakeLists.txt
# Allow other versions for fast_float
sed -i -e '/VERSION .*/ d' ThirdParty/fast_float/CMakeLists.txt
%build
%if %{with mpi}
source %{mpiprefix}/bin/mpivars.sh
@ -466,6 +478,7 @@ export CXXFLAGS="%{optflags}"
-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_fast_float:BOOL=%{?with_fast_float:ON}%{!?with_fast_float:OFF} \
-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=%{?with_fmt:ON}%{!?with_fmt:OFF} \
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss:BOOL=OFF \