[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Soc: Pygame on ctypes
On Mon, 2006-05-01 at 13:57 +1000, Alex Holkner wrote:
> There was some talk on the list earlier this year about rewriting Pygame
> to use ctypes. I've been thinking about applying to do this for Soc
> 2006. There's a little more info on the why and what at
> http://wiki.python.org/moin/CodingProjectIdeas/PygameOnCtypes.
>
> My approach would be to wrap SDL with ctypes, then reimplement the
> Pygame API in pure python as much as possible.
Yes, I am guessing for SoC just a straight SDL binding is a good target.
I also wouldn't worry about exception handling. The binding would just
return error codes and rely on SDL_GetError like a C program does. The
threading in SDL can likely be ignored.
I would also take a good look at the PyOpenGL development that is
happening with ctypes.
It would be interesting to see if we could bridge SDL_RWops to a python
file-like object entirely from ctypes. I am guessing not because of the
threaded uses of SDL_RWops in SDL_mixer.