From 487389355730d12501edaeef65396544eef24bee Mon Sep 17 00:00:00 2001 From: "David C. Lonie" Date: Mon, 9 Feb 2015 14:44:21 -0500 Subject: [PATCH] Increase the initial GL2PS feedback buffer size. To prevent having to resize and rerender multiple times when a very large amount of data is pushed through (see #517), start with a 50MB buffer. This buffer size is sufficient to store the 1M triangles used in the #517 example. --- Packages/vcs/Lib/VTKPlots.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Packages/vcs/Lib/VTKPlots.py b/Packages/vcs/Lib/VTKPlots.py index 506ce2a86d..74481777a6 100644 --- a/Packages/vcs/Lib/VTKPlots.py +++ b/Packages/vcs/Lib/VTKPlots.py @@ -1335,6 +1335,13 @@ def vectorGraphics(self, output_type, file, width=None, height=None, units=None) raise Exception("Nothing on Canvas to dump to file") gl = vtk.vtkGL2PSExporter() + + # This is the size of the initial memory buffer that holds the transformed + # vertices produced by OpenGL. If you start seeing a lot of warnings: + # GL2PS info: OpenGL feedback buffer overflow + # increase it to save some time. + gl.SetBufferSize(50*1024*1024) # 50MB + gl.SetInput(self.renWin) gl.SetCompress(0) # Do not compress gl.SetFilePrefix(".".join(file.split(".")[:-1]))