1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
There are two (different) sets of Python wrappers for GLE. One
set is included in this directory. Another set comes by default
with the OpenGL Python wrappers at http://pyopengl.sourceforge.net/
Neither set should be considered more 'official' or 'standard'
than the other: use the one that is most convenient for you.
Python and SWIG
---------------
The Simple Wrapper Generator (SWIG) can be used to create python
bindings for gle functions. Normally, a small definition file,
run through swig, is enough.
This directory contains the definition and autogenerated code
for a special, non-generally available version of SWIG. It
should work; however, it is unmaintainable. If you are willing to
maintain this code, let me (linas@linas.org) know.
See email below:
> From: "Michel Sanner" <sanner@scripps.edu>
> To: linas@linas.org
> Subject: resending -- Re: Gle wrapper source]
>
> Hi Linas,
>
> In fact I used a "special" version of SWIG (1.2a1) which David Baisley gave me
> a few yars ago when I was working on typemaps for Numeric arrays. This version
> provides pre-processing capabilities which are necessary for the typemaps I
> used in gle.i. Unfortunately, these capabilities never made it into SWIG (at
> least not up to now) and therefore noone out there would have a SWIG capable of
> generating the wrapper code from that interface.
>
> The pre-processing capabilities are used to generate dimension arguments from
> the shape of numeric arrays. Using this, a function with 2 arguments (int
> nbPts, float *coords) can be called from Python by passing only a numeric
> array. the nbPts arguments will be generated automatically from the the numeric
> array's shape.
>
> The interface could be made to work for the publicly available version of SWIG
> by replacing these typemaps by simple ones (i.e. not generating arguments) in
> which case the function mentioned aboved would have to be called with 2
> arguments in Python ( foo( my_array.shape[0], my_array) ).
>
>
> -Michel
>
|