[vtkusers] Writing Postscript files from VTK
lists at carlh.net
Tue Oct 1 08:32:39 EDT 2002
I'm interested in writing vector Postscript files of VTK renderings.
Consulting the mailing list archive suggests that gl2ps might be able to
do this. I've tried the following example:
/* Set up a render window with a wireframe representation of a
/* ... */
FILE* fp = fopen("test.eps", "w");
int buffsize = 0;
int state = GL2PS_OVERFLOW;
while (state == GL2PS_OVERFLOW)
buffsize += 1024*1024;
gl2psBeginPage("Title", "Software", GL2PS_EPS, 0,
GL2PS_SIMPLE_LINE_OFFSET, GL_RGBA, 0, NULL,
buffsize, fp, NULL);
state = gl2psEndPage();
Unfortunately this gives me zero-sized EPS files, with gl2ps saying
"GL2PS warning: Empty feedback buffer".
Can anyone show me how it is done?
Thanks in advance,
More information about the vtkusers