rpms/paraview/FC-5 paraview-2.4.3-xopengl.patch,NONE,1.1

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Thu Jun 29 20:21:18 UTC 2006


Author: orion

Update of /cvs/extras/rpms/paraview/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28172

Added Files:
	paraview-2.4.3-xopengl.patch 
Log Message:
A patch from CVS to fix vtkXOpenRenderWindow.cxx


paraview-2.4.3-xopengl.patch:

--- NEW FILE paraview-2.4.3-xopengl.patch ---
--- paraview-2.4.3/VTK/Rendering/vtkXOpenGLRenderWindow.cxx	2006-02-01 07:57:40.000000000 -0700
+++ ParaView/VTK/Rendering/vtkXOpenGLRenderWindow.cxx	2006-06-05 15:16:05.000000000 -0600
@@ -23,6 +23,7 @@
 #include "vtkOpenGLPolyDataMapper.h"
 #include <GL/gl.h>
 #include "GL/glx.h"
+#include "vtkgl.h"
 #else
 #include "MangleMesaInclude/osmesa.h"
 #endif
@@ -39,7 +40,6 @@
 #include "vtkObjectFactory.h"
 #include "vtkRendererCollection.h"
 #include "vtkOpenGLExtensionManager.h"
-#include "vtkgl.h"
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -63,9 +63,12 @@
   GLXContext PixmapContextId;
   Window PixmapWindowId;
 
+
   // support for Pbuffer based offscreen rendering
   GLXContext PbufferContextId;
+#ifndef VTK_IMPLEMENT_MESA_CXX
   vtkglX::GLXPbuffer Pbuffer;
+#endif
 
   // store previous settings of on screen window
   int ScreenDoubleBuffer;
@@ -87,7 +90,9 @@
   this->PixmapWindowId = 0;
 
   this->PbufferContextId = NULL;
+#ifndef VTK_IMPLEMENT_MESA_CXX
   this->Pbuffer = 0;
+#endif
   
   this->ScreenMapped = rw->GetMapped();
   this->ScreenDoubleBuffer = rw->GetDoubleBuffer();
@@ -101,7 +106,7 @@
 
 
 #ifndef VTK_IMPLEMENT_MESA_CXX
-vtkCxxRevisionMacro(vtkXOpenGLRenderWindow, "$Revision: 1.61.2.3 $");
+vtkCxxRevisionMacro(vtkXOpenGLRenderWindow, "$Revision: 1.61.2.4 $");
 vtkStandardNewMacro(vtkXOpenGLRenderWindow);
 #endif
 
@@ -123,6 +128,8 @@
 #endif
 
 
+#ifndef VTK_IMPLEMENT_MESA_CXX
+
 vtkglX::GLXFBConfig* vtkXOpenGLRenderWindowTryForFBConfig(Display *DisplayId,
                                                  int drawable_type,
                                                  int doublebuff, int stereo,
@@ -176,6 +183,8 @@
   return fb;
 }
 
+#endif
+
 
 XVisualInfo *vtkXOpenGLRenderWindowTryForVisual(Display *DisplayId,
                                                int doublebuff, int stereo,
@@ -225,6 +234,7 @@
   return glXChooseVisual(DisplayId, DefaultScreen(DisplayId), attributes );
 }
 
+#ifndef VTK_IMPLEMENT_MESA_CXX
 vtkglX::GLXFBConfig *vtkXOpenGLRenderWindowGetDesiredFBConfig(
         Display* DisplayId,
         int& win_stereo, int& win_multisamples, int& win_doublebuffer, int& win_alphaplanes,
@@ -281,6 +291,7 @@
     }
   return ( fbc );
 }
+#endif
 
 XVisualInfo *vtkXOpenGLRenderWindow::GetDesiredVisualInfo()
 {
@@ -418,6 +429,7 @@
     }
 }
 
+#ifndef VTK_IMPLEMENT_MESA_CXX
 static int PbufferAllocFail = 0;
 extern "C"
 {
@@ -427,6 +439,7 @@
     return 1;
   }
 }
+#endif
 
 // Initialize the window for rendering.
 void vtkXOpenGLRenderWindow::WindowInitialize (void)
@@ -615,6 +628,7 @@
         this->OwnDisplay = 1;
         }
 
+#ifndef VTK_IMPLEMENT_MESA_CXX
       int v1, v2;
       glXQueryVersion(this->DisplayId, &v1, &v2);
 
@@ -665,6 +679,8 @@
             }
           }
         }
+
+#endif
       
       // GLX 1.3 doesn't exist or failed to allocate Pbuffer
       // fallback on GLX 1.0 GLXPixmap offscreen support
@@ -845,10 +861,12 @@
       {
       if(this->OffScreenRendering && this->Internal->PbufferContextId)
         {
+#ifndef VTK_IMPLEMENT_MESA_CXX
         vtkglX::DestroyPbuffer(this->DisplayId, this->Internal->Pbuffer);
         this->Internal->Pbuffer = 0;
         glXDestroyContext(this->DisplayId, this->Internal->PbufferContextId);
         this->Internal->PbufferContextId = NULL;
+#endif
         }
       else if(this->OffScreenRendering && this->Internal->PixmapContextId)
         {
@@ -1051,6 +1069,7 @@
 #endif
   if(this->OffScreenRendering && this->Internal->PbufferContextId)
     {
+#ifndef VTK_IMPLEMENT_MESA_CXX
     // Disconnect renderers from this render window.
     // Done to release graphic resources.
     vtkRenderer *ren;
@@ -1067,6 +1086,7 @@
     glXDestroyContext(this->DisplayId, this->Internal->PbufferContextId);
     this->Internal->PbufferContextId = NULL;
     this->WindowInitialize();
+#endif
     }
   else if(this->OffScreenRendering && this->Internal->PixmapContextId)
     {
@@ -1202,6 +1222,7 @@
     }
   else
 #endif
+#ifndef VTK_IMPLEMENT_MESA_CXX
   if(this->OffScreenRendering && this->Internal->PbufferContextId)
     {
     if (((this->Internal->PbufferContextId != glXGetCurrentContext()) || this->ForceMakeCurrent))
@@ -1211,7 +1232,9 @@
       this->ForceMakeCurrent = 0;
       }
     }
-  if(this->OffScreenRendering && this->Internal->PixmapContextId)
+  else 
+#endif
+    if(this->OffScreenRendering && this->Internal->PixmapContextId)
     {
     if (((this->Internal->PixmapContextId != glXGetCurrentContext()) || this->ForceMakeCurrent))
       {
@@ -1788,10 +1811,12 @@
         {
         if(this->Internal->PbufferContextId)
           {
+#ifndef VTK_IMPLEMENT_MESA_CXX
           vtkglX::DestroyPbuffer(this->DisplayId, this->Internal->Pbuffer);
           this->Internal->Pbuffer = 0;
           glXDestroyContext(this->DisplayId, this->Internal->PbufferContextId);
           this->Internal->PbufferContextId = NULL;
+#endif
           }
         else if(this->Internal->PixmapContextId)
           {
--- paraview-2.4.3/VTK/Rendering/vtkXMesaRenderWindow.h.xopengl	2006-06-05 16:39:59.000000000 -0600
+++ paraview-2.4.3/VTK/Rendering/vtkXMesaRenderWindow.h	2006-06-05 16:40:27.000000000 -0600
@@ -122,6 +122,10 @@
   virtual int     *GetScreenSize();
 
   // Description:
+  // Get the size of the window
+  virtual int     *GetSize();
+
+  // Description:
   // Get the position in screen coordinates (pixels) of the window.
   virtual int     *GetPosition();
 




More information about the fedora-extras-commits mailing list