From: Brian P. <br...@va...> - 2001-07-06 14:25:07
|
Allen Barnett wrote: > > Hi, > > Has anybody ever built a hardcopy output driver for Mesa which (more or > less) retained the detailed geometry of the original primitives (as > opposed to just taking a screen snapshot)? For example, older versions > of the SGI Showcase program generated postscript commands which > corresponded directly to the transformed and lighted points, lines and > polygons in a scene; it even seemed to take care of depth sorting so > that 3D elements where drawn correctly. (It didn't support texture > mapping, though, which is probably why later versions of Showcase > generated raster images instead.) > > I'd like to build something which works with StarOffice (or OpenOffice). > Currently, the only color vector drawing format which it can import is a > Windows Metafile (which is basically a 2D drawing format). You could > probably do something similar to the Showcase PostScript driver if you > weren't too picky about smooth shading and texture mapping. > > Would this be a reasonable approach? Or would it be better to just > render in OSMesa at a high resolution and live with the raster image? As I'm sure you know, there's a fundamental problem in that OpenGL is raster-oriented while PostScript is vector-oriented. Marcelo mentioned gl2ps. I haven't used it personally. I think most people render high-resolution images with OpenGL then print the raster images. You might check out TR for generating extra-large images: http://www.mesa3d.org/brianp/TR.html Another approach, if you're just interested in line drawing, might be to use OpenGL's feedback mode to capture the transformed coordinates and emit PostScript line drawing commands. -Brian |