VRender Library

Development: Cyril Soler

50 Triangles

Presentation

The VRender library is a simple tool to render the content of an OpenGL window to a vectorial device such as Postscript, XFig, and soon SVG. The main usage of such a library is to make clean vectorial drawings for publications, books, etc.

In practice, VRender replaces the z-buffer based hidden surface removal of OpenGL by sorting the geometric primitives so that they can be rendered in a back-to-front order, possibly cutting them into pieces to solve cycles.

VRender is also responsible for the vectorial snapshot feature of the QGLViewer library.

Main features

Important note

The VRender library is entirely available as a part of the QGLViewer library. For most uses, you will have better use QGLViewer directly. Otherwise, you still can get VRendEr se`a˛ately. Note that QGLViewer compiles under windows, mac and linux, which is not necessarily the case for the distribution of VRender I give here. However, the most recent version of the sources are here, so linux users will still take advantage to it.

Compiled library

Here is a compiled version of the library for Fedora Core 2:

Source code

The source code can be obtained there. It should compile easily under any linux provided that you have qmake: Compilation instructions:
Get the sources, un-targz, type qmake and make. If you don't have qmake, try using the existing makefile.

Output examples

Click on the examples below to get and see some postscript files generated by VRender. Please read the note about postscript display to avoid seeing bugs were there is not (I would not show the images otherwise). For windows users, eps files have been converted to pdf format using acrobat distiller.

50 random triangles with edges (Deadly test for BSP) Classical teapot with Gouraud shading. Note that line/polygon sorting is robust, and that hidden faces/lines have been carefully removed. Illustration in a paper of my own. The characters where added to the postscript in a second pass using XFig. Rendering of a model which does not require polygon splitting. In this case, the topological sort algorithm works nice.

Limitations

Acknowledgements

Many thanks to Fédéric Delhoume for providing the postscript gouraud-shading triangle code, and to Alan Murta for the general polygon clipping library. Remarks/questions/improvements are welcome and can be sent to the adress at top of this page.

Latest news

June 23, 2005 Birth of the web site.

Valid XHTML 1.0! Valid CSS! Last modified on Thursday, March 3, 2005.