gl2ps
GL2PS: an OpenGL to PostScript printing library Christophe Geuzaine Example: PS, EPS, PDF and SVG files created with the gl2psTest.c demo provided in the distribution. This illustrates the handling of smooth shading, intersecting primitives, line stippling, vector text rendering, multiple viewports and mixed vector/bitmap output. Compare with a PNG screenshot of the OpenGL window. Download The latest stable version of GL2PS is gl2ps-1.4.0.tgz. Older versions and nightly source snapshots are available here. For access to the Git repository use: 'git clone http://gitlab.onelab.info/gl2ps/gl2ps.git'. For questions and discussions about GL2PS see the gl2ps mailing list. If you think you have found a bug you can also file a report directly here. You can also subscribe to the gl2ps-announce mailing list to be notified automatically when a new version of GL2PS is released. To help fund GL2PS development, you can make a donation. Documentation Contents 1 Introduction 2 Usage 2.1 gl2psBeginPage and gl2psEndPage 2.1.1 Specification 2.1.2 Description and arguments 2.1.3 Return value 2.2 gl2psText and gl2psTextOpt 2.2.1 Specification 2.2.2 Description and arguments 2.2.3 Return value 2.3 gl2psDrawPixels 2.3.1 Specification 2.3.2 Description and arguments 2.3.3 Return value 2.4 gl2psSpecial 2.4.1 Specification 2.4.2 Description and arguments 2.4.3 Return value 2.5 gl2psEnable and gl2psDisable 2.5.1 Specification 2.5.2 Description and arguments 2.5.3 Return value 2.6 gl2psPointSize, gl2psLineWidth, gl2psLineCap and gl2psLineJoin 2.6.1 Specification 2.6.2 Description and arguments 2.6.3 Return value 2.7 gl2psBlendFunc 2.7.1 Specification 2.7.2 Description and arguments 2.7.3 Return value 2.8 gl2psBeginViewport and gl2psEndViewport 2.8.1 Specification 2.8.2 Description and arguments 2.8.3 Return value 2.9 gl2psSetOptions and gl2psGetOptions 2.9.1 Specification 2.9.2 Description and arguments 2.9.3 Return value 3 Example 4 Tips and tricks 5 Limitations 6 Contributors 7 Links 8 Versions 1 Introduction GL2PS is a C library providing high quality vector output for any OpenGL application. The main difference between GL2PS and other similar libraries (see section 7) is the use of sorting algorithms capable of handling intersecting and stretched polygons, as well as non manifold objects. GL2PS provides advanced smooth shading and text rendering, culling of invisible primitives, mixed vector/bitmap output, and much more... GL2PS can currently create PostScript (PS), Encapsulated PostScript (EPS), Portable Document Format (PDF) and Scalable Vector Graphics (SVG) files, as well as LATEX files for the text fragments. GL2PS also provides limited, experimental support for Portable LaTeX Graphics (PGF). Adding new vector output formats should be relatively easy; you can also use the excellent pstoedit program to transform the PostScript files generated by GL2PS into many other vector formats such as xfig, cgm, wmf, etc. GL2PS is available at http://www.geuz.org/gl2ps/ and is released under the GNU Library General Public License (see COPYING.LGPL). GL2PS can also be used under an alternative license that allows (amongst other things, and under certain conditions) for static linking with closed-source software (see COPYING.GL2PS).