Package: paraview / 5.4.1+dfsg4-3.1

fix_opengl_arm.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Author: Gert Wollny <gewo@debian.org>
Description: Use QOpenGLExtraFunctions instead of *3_2, because the
 latter is not available on ARM.
Debian-Bug: https://bugs.debian.org/893735
--- a/VTK/GUISupport/Qt/QVTKOpenGLWidget.cxx
+++ b/VTK/GUISupport/Qt/QVTKOpenGLWidget.cxx
@@ -19,7 +19,7 @@
 #include <QOpenGLDebugLogger>
 #include <QOpenGLFramebufferObject>
 #include <QOpenGLFunctions>
-#include <QOpenGLFunctions_3_2_Core>
+#include <QOpenGLExtraFunctions>
 #include <QOpenGLTexture>
 #include <QPointer>
 #include <QScopedValueRollback>
@@ -455,17 +455,21 @@
 
   // blit from this->FBO to QOpenGLWidget's FBO.
   vtkQVTKOpenGLWidgetDebugMacro("paintGL::blit-to-defaultFBO");
-  QOpenGLFunctions_3_2_Core* f =
-    QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
-  if (f)
+
+  QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
+  QOpenGLExtraFunctions *fx = QOpenGLContext::currentContext()->extraFunctions();
+  
+  if (f && fx)
   {
     f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, this->defaultFramebufferObject());
-    f->glDrawBuffer(GL_COLOR_ATTACHMENT0);
+    
+    GLenum buffers[] = {GL_COLOR_ATTACHMENT0}; 
+    fx->glDrawBuffers(1, buffers);
 
     f->glBindFramebuffer(GL_READ_FRAMEBUFFER, this->FBO->handle());
-    f->glReadBuffer(GL_COLOR_ATTACHMENT0);
+    fx->glReadBuffer(GL_COLOR_ATTACHMENT0);
     f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
-    f->glBlitFramebuffer(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1],
+    fx->glBlitFramebuffer(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1],
       0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], GL_COLOR_BUFFER_BIT,
       GL_NEAREST);