[PyOpenGL-Users] Preliminary gl2ps wrapper for PyOpenGL
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@ro...> - 2003-05-20 07:39:48
|
I've just built (and done some minimal testing of) a gl2ps wrapper for
use with PyOpenGL. Haven't tested anything save the two primary entry
points, but they seem to work properly. As a note, the mechanism works
using view-space absolute coordinates w/out the benefit of the depth
buffer, so if your background-drawing code plays tricks such as clearing
the depth buffer after drawing (which OpenGLContext does), you can wind
up with your scene behind the background's geometry.
Anyway, if people are interested enough, I'll post the source
somewhere. The wrapper script is basically just a slightly trimmed
version of the gl2ps.h header with some minimal type-mapping. I wound
up renaming the gl2ps.c file to _gl2ps.c to get around an annoying error
where the build system was creating two gl2ps.o files. Other than that
no noticable changes to the base package that I can recall. Oh, and at
the moment you need to define WIN32 explicitly to build. Haven't
figured out why that's necessary as of yet.
Here's the results from a simple VRML file (one normally intended to be
drawn w/out textures):
http://members.rogers.com/mcfletch/programming/test.eps
Anyway, if anyone's interested, I'll look at polishing/finishing the
wrapper and releasing it.
Enjoy all,
Mike
Mike C. Fletcher wrote:
...
> Similar-looking C lib for the same purpose (also LGPL):
>
> http://www.geuz.org/gl2ps/
>
> apparently had a Python wrapper at some point in time, though it
> doesn't appear to be available any more (Toby?) All in all this looks
> like the most mature of the solutions (for instance it appears able to
> deal with intersection polygons, though if I'm reading right it may
> generate striated results for smooth-shaded polygons.
...
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
|