Index: VTK/Rendering/vtkMesaRenderWindow.h =================================================================== --- VTK.orig/Rendering/vtkMesaRenderWindow.h +++ VTK/Rendering/vtkMesaRenderWindow.h @@ -108,6 +108,7 @@ // Get the size of the color buffer. // Returns 0 if not able to determine otherwise sets R G B and A into buffer. int GetColorBufferSizes(int *rgba); + int GetColorBufferSizes(vtkIntArray *rgba); // Description: // Initialize OpenGL for this window. Index: VTK/Rendering/vtkOpenGLRenderWindow.cxx =================================================================== --- VTK.orig/Rendering/vtkOpenGLRenderWindow.cxx +++ VTK/Rendering/vtkOpenGLRenderWindow.cxx @@ -17,6 +17,7 @@ #include "vtkFloatArray.h" #include "vtkgl.h" #include "vtkIdList.h" +#include "vtkIntArray.h" #include "vtkObjectFactory.h" #include "vtkOpenGLActor.h" #include "vtkOpenGLCamera.h" @@ -353,6 +354,22 @@ } } +int vtkOpenGLRenderWindow::GetColorBufferSizes(vtkIntArray *rgba) +{ + if (rgba==NULL) + { + return 0; + } + + if ( rgba->GetMaxId()+1 != 4) + { + vtkDebugMacro("Resizing array."); + rgba->SetNumberOfComponents(1); + rgba->SetNumberOfValues(4); + } + return this->GetColorBufferSizes(rgba->GetPointer(0)); +} + unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1, int x2, int y2, int front) Index: VTK/Rendering/vtkOpenGLRenderWindow.h =================================================================== --- VTK.orig/Rendering/vtkOpenGLRenderWindow.h +++ VTK/Rendering/vtkOpenGLRenderWindow.h @@ -104,6 +104,7 @@ // Get the size of the color buffer. // Returns 0 if not able to determine otherwise sets R G B and A into buffer. int GetColorBufferSizes(int *rgba); + int GetColorBufferSizes(vtkIntArray *rgba); // Description: // Initialize OpenGL for this window. Index: VTK/Rendering/vtkRenderWindow.h =================================================================== --- VTK.orig/Rendering/vtkRenderWindow.h +++ VTK/Rendering/vtkRenderWindow.h @@ -41,6 +41,7 @@ #include "vtkWindow.h" class vtkFloatArray; +class vtkIntArray; class vtkPainterDeviceAdapter; class vtkRenderWindowInteractor; class vtkRenderer; @@ -497,6 +498,7 @@ // Get the size of the color buffer. // Returns 0 if not able to determine otherwise sets R G B and A into buffer. virtual int GetColorBufferSizes(int *rgba) = 0; + virtual int GetColorBufferSizes(vtkIntArray *rgba) = 0; // Description: // Get the vtkPainterDeviceAdapter which can be used to paint on