[pypy-dev] PyOpenGL

Amaury Forgeot d'Arc amauryfa at gmail.com
Tue Apr 1 09:30:19 CEST 2008


Hello,

On Tue, Apr 1, 2008 at 6:24 AM, Maciek Fijalkowski <fijal at genesilico.pl> wrote:
> It seems that sentence on a web page saying "The binding is created
>  using the standard (in Python 2.5) ctypes library" is simply a lie :(
>  There is a SWIG binding laying there. There is roughly 20k lines of swig
>  interface code. Not sure how easy would be to wrap automatically, but
>  this binding is definitely not written using ctypes, hence I think we're
>  not going to support this any time soon.

It seems that Version 3 of PyOpenGL migrated from SWIG to ctypes:
http://pyopengl.sourceforge.net/ctypes/development.html

The source code contains tons of blocks like:

# /usr/include/GL/freeglut_std.h 385
glutInitWindowPosition = platform.createBaseFunction(
       'glutInitWindowPosition', dll=platform.GLUT, resultType=None,
       argTypes=[c_int,c_int],
       doc='glutInitWindowPosition( c_int(x), c_int(y) ) -> None',
       argNames=('x', 'y'),
)

which is more pypy-friendly.

--
Amaury Forgeot d'Arc



More information about the Pypy-dev mailing list