vtk/vtk-includes.patch
Orion Poplawski a6fa95ab4c Update to 9.0.1
Disable OSMesa - conflicts with X support
Build against Fedora gl2ps, libharu, utf8cpp
Drop python3-vtk-qt packages
No longer ship compiled examples
Install jar file into /usr/share/java
Fix JNI install location
Drop Qt4 build option
Drop gcc10 patch
2021-01-30 08:18:17 -07:00

72 lines
2.5 KiB
Diff

diff -up VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.includes VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx
--- VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.includes 2020-06-26 07:24:40.000000000 -0600
+++ VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx 2021-01-27 06:51:11.776958150 -0700
@@ -61,10 +61,23 @@ typedef ptrdiff_t GLsizeiptr;
#include <sstream>
+#include <X11/Xatom.h>
+#include <X11/cursorfont.h>
+#if VTK_HAVE_XCURSOR
+#include <X11/Xcursor/Xcursor.h>
+#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#include <X11/cursorfont.h>
+/*
+ * Work-around to get forward declarations of C typedef of anonymous
+ * structs working. We do not want to include XUtil.h in the header as
+ * it populates the global namespace.
+ */
+struct vtkXVisualInfo : public XVisualInfo
+{
+};
+
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
typedef GLXContext (*glXCreateContextAttribsARBProc)(
@@ -224,7 +237,7 @@ int XEventTypeEquals(Display*, XEvent* e
return event->type == EventType;
}
-XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo()
+vtkXVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo()
{
XVisualInfo* v = nullptr;
@@ -258,7 +271,7 @@ XVisualInfo* vtkXOpenGLRenderWindow::Get
vtkErrorMacro(<< "Could not find a decent visual\n");
}
}
- return (v);
+ return reinterpret_cast<vtkXVisualInfo*>(v);
}
vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow()
diff -up VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h.includes VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h
--- VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h.includes 2020-06-26 07:24:40.000000000 -0600
+++ VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h 2021-01-27 06:49:09.420323338 -0700
@@ -28,11 +28,11 @@
#include "vtkOpenGLRenderWindow.h"
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include <X11/Xlib.h> // Needed for X types used in the public interface
-#include <X11/Xutil.h> // Needed for X types used in the public interface
#include <stack> // for ivar
class vtkIdList;
class vtkXOpenGLRenderWindowInternal;
+struct vtkXVisualInfo;
class VTKRENDERINGOPENGL2_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow
{
@@ -112,7 +112,7 @@ public:
*/
virtual Colormap GetDesiredColormap();
virtual Visual* GetDesiredVisual();
- virtual XVisualInfo* GetDesiredVisualInfo();
+ virtual vtkXVisualInfo* GetDesiredVisualInfo();
virtual int GetDesiredDepth();
//@}