Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the initial GL2PS feedback buffer size. #1016

Merged
merged 3 commits into from
Feb 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Packages/vcs/Lib/VTKPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,22 @@ 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.
# ParaView lags so we need a try/except around this
# in case it is a ParaView build
try:
gl.SetBufferSize(50*1024*1024) # 50MB
except:
pass

# Since the vcs layer stacks renderers to manually order primitives, sorting
# is not needed and will only slow things down and introduce artifacts.
gl.SetSortToOff()

gl.SetInput(self.renWin)
gl.SetCompress(0) # Do not compress
gl.SetFilePrefix(".".join(file.split(".")[:-1]))
Expand Down