[vtkusers] Writing Postscript files from VTK
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Fri Oct 4 08:51:35 EDT 2002
Hi,
It seems "GL2PS warning: Empty feedback buffer" crops up unless you call
renwin->Render at least once *before* you call gl2psBeginPage(....);
Goodwin
----- Original Message -----
From: "Carl Hetherington" <lists at carlh.net>
To: "Melvin Hadasht" <melvin.hadasht at free.fr>
Cc: "VTK Mailing list" <vtkusers at public.kitware.com>
Sent: Thursday, October 03, 2002 5:21 PM
Subject: Re: [vtkusers] Writing Postscript files from VTK
> On Tue, 1 Oct 2002, Melvin Hadasht wrote:
>
> > Hi Carl,
> >
> > on Tue, 1 Oct 2002 13:32:39 +0100 (GMT Daylight Time)
> > Carl Hetherington <lists at carlh.net> wrote:
> >
> > > Hi,
> > >
> > > 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
> > > ** vtkPolyData.
> > > */
> > >
> > > /* ... */
> > >
> > > 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);
> >
> > You should test for the return value of fopen. Maybe the problem was
there.
> >
> > I don't know the following may help or not, but in an old code I had the
> > filename also as the last argument of gl2psBeginPage{...char *filename;
File *fp
> > = fopen(filename,"w");...;gl2psBeginPage(...,filename);...}. I can't
remember
> > why I did that.
>
> Thanks for the reply. Seems to be working today, so perhaps it was me not
> checking the file pointer... idiot that I am.
>
> Thanks
>
> Carl
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list