[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] AGG library



Brian Fisher wrote:
On Tue, Mar 11, 2008 at 11:32 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
[snip]
 There is a source directory full of .cpp files that need compiling to libraries.
That doesn't sound right at all. There is no such thing as an agg
library. There's just source code and some example files that include
a portion of the AGG source. I think the only reasonable way to
integrate with pygame would be to have a C extension module that was
statically linked to compiled C++ source files.


Whether they are libraries or object files amounts to the same thing, C++ compiled files exporting C++ classes that need to link to a C++ compiled extension module that must work with those classes. Everything must be compiled with the same tools. But see below.

[snip]
 The relevant pieces of AGG would become part
 of the Pygame source distribution and presumably included in SVN. There
 is also the task of working out the AGG build steps and adding them to
 setup.py.

The first sentence here sounds exactly right for how I'd see it going
down - basically pygame would absorb agg source, just like it did for
SDL_gfx for transform and draw. The second sentence sounds like a
minor thing - the only "AGG build steps" would be compiling the cpp
files that expose extern C functions to pygame. I would expect that
works fine, cause I would think GCC's C++ backend is link friendly
with it's C backend, just like it is with Visual Studio.
If AGG exports a pure C api then that could simplify things. But including AGG in SVN would do so as well. If the AGG source files can be compiled and linked without setting a bunch of platform dependent flags (e.g. macros) then doing so with distutils is straight forward.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>