View Full Version : Export to vectorgraphics (GL2PS?)

01-08-2010, 09:11 PM

I am working on a project and I want to export the results of what is displayed. It uses OpenGL and I already have found an option on this site to export to bitmaphttp://www.pascalgamedevelopment.com/forum/index.php?topic=5624.0.

I also tried the Export to TGA but that comes out distorted and in gray scales. Now it is not my idea to export to bitmap, but rather to some sort of vector graphic (EPS, SVG, ....) and maybe some more standard graphic formats like (PNG, GIF, JPG).

Does any of you have some ideas how I can accomplish this? I have found GL2PS, but it is in C (http://geuz.org/gl2ps/) and I cannot find the DLL.
RenderEPS (http://www.opengl.org/resources/code/samples/mjktips/Feedback.html) would also be nice, but has the same problem. Since I am not a C programmer, I have no idea how I can accomplish to compile the project and use in my Pascal (Delphi 2009) project.

So does anyone have experience with one of the suggested packages or has any other tips/hints/.... for me to accomplish the exports?

Thanks in advance

02-08-2010, 05:09 PM
RenderEPS is your best bet as that example works from the source provided on the page. No other dll's needed. It also is small enough to convert to delphi code.
Try to understand what happens in the printbuffer part as that is the basic part of reading the feebdback buffer of what opengl renders on screen, the spewWireFrameEPS does the same except that it formats the output so that it makes an eps file. So try to understand how glFeedbackBuffer(size, GL_3D_COLOR, feedbackBuffer) works and you almost have your solution.

03-08-2010, 12:04 PM
Thanks for your reply

It also is small enough to convert to delphi code.
Not if you dont have much C experience (say nothing at all).

Is there no one who has done any of this before? Either vector based or pixelbased (not bitmap, but any other file format). I don't have the time to learn C and convert the project to Delphi. I am under the impression that someone might have done what I am looking for already, so hoping that someone can assist me.

I cant believe that I am the first Delphi programmer that is interested in RenderEPS or GL2PS.