[gl2ps] Output to Cairo ?
Stuart Axon
stuaxo2 at yahoo.com
Tue Sep 30 15:04:42 CEST 2008
Any luck finding the source to this, I'm fairly sure the guy working on pantograph would be interested - he's looking to port to C++ and possibly make it independent of Blender. It'll be a little while before I can have a go myself, I also know at least one 3d programmer who might be interested.
----- Original Message ----
From: Bill Baxter <wbaxter at gmail.com>
To: Stuart Axon <stuaxo2 at yahoo.com>
Cc: gl2ps at geuz.org
Sent: Thursday, September 25, 2008 2:11:02 AM
Subject: Re: [gl2ps] Output to Cairo ?
If you are seriously interested in working on this sort of thing, I
would not recommend basing it on gl2ps, actually.
gl2ps requires modifying and recompiling your GL code with special gl2ps calls.
A better approach is the GL intercept approach where you replace the
OpenGL .dll or .so with a wrapper that sniffs out all the GL calls
being made.
OGLE is a tool that works that way: http://ogle.eyebeamresearch.org/
I hacked on OGLE a bit and managed to graft gl2ps onto it, allowing
non-invasive creation of SVG output from unmodified GL programs. It
has many limitations but the basic geometry capture part works.
Let me know if you'd be interested in the source.
--bb
On Thu, Sep 25, 2008 at 8:45 AM, Stuart Axon <stuaxo2 at yahoo.com> wrote:
> Yes, at first it would seem pointless at first glance, - what I want it for is to be able to link structure synth, a 3d program that renders using open gl, in to shoebot (which renders using cairo).
>
> shoebot can be used as an inkscape plugin.
>
> If there was gl2cairo then I could make a 3d shape in structure synth, change it and have the 2d version instantly in inkscape...
> Having to go via an intermediate file is not nearly so good (generate an svg, then inkscape parses it and loads it and renders it... thats gonna be really bad)
>
> - So basically anywhere, where you want to convert 3d into 2d, for display (as opposed to generate a file, then processing it).
>
>
> The benefit to the gl2ps project of making a gl2cairo fork is that the output code should become much simpler - cairo handles all the formats you do already on multiple platforms. So that part of the code would be maintained there, and as it's used by GTK, QT, firefox and others thats a lot of eyes on that code, probably some magnitude more than work on gl2ps.
>
>
> Also, as cairo is a of a trendy project at the moment, then it would probably bring more users to this project. I was pointed to this project from the cairo mailing list when I asked about how to do this, and this one is the one with the most recent updates.
>
>
> ----- Original Message ----
> From: Bill Baxter <wbaxter at gmail.com>
> To: Stuart Axon <stuaxo2 at yahoo.com>
> Cc: gl2ps at geuz.org
> Sent: Wednesday, September 24, 2008 10:29:38 PM
> Subject: Re: [gl2ps] Output to Cairo ?
>
> On Thu, Sep 25, 2008 at 5:55 AM, Stuart Axon <stuaxo2 at yahoo.com> wrote:
>> Hi,
>> GL2PS looks like an interesting project, any idea how difficult it would be to make it use cairo, so that images could be rendered to screen ?
>> Using cairo might simplify the code, also it would enable interesting possibilities: cairo supports output to svg, pdf, various image files, printers and 2d architectures opengl is supported.
>>
>> Does anybody have any idea how difficult it would be to do ?
>>
>> BTW, is there a bug tracker where I can enter this feature request ?
>
>
> I don't understand what the point would be. The idea of GL2PS is to
> get output from your OpenGL programs in some vector format. So
> presumably you already have things displaying on a screen to begin
> with. Why go the long way around from screen to cairo just to get
> back to the screen? If you want to display the output, you can always
> load it up in any program that can read the formats gl2ps reads.
>
> --bb
>
>
>
>
>
>