[pypy-dev] (no subject)
hi, i'm trying to make some pyopengl [0] -based code [1] run on top of pypy. this is partially successful, but i need some advice to progress further. pyopengl 3.x makes use of ctypes to provide the opengl binding, and it works out of the box for simple functions (those that do not takes c-pointer to buffers of data as arguments). for the rest, the first issue is that pyopengl use two functions from the ctypes.pythonapi lib, namely PyString_AsString and PyBuffer_FromMemory. any advice on how to replace those functions to make them compatible with pypy? Mike Fletcher (pyopengl author) gave me some hints about that point: For the first issue, those are going to require some reworking, in essence those are C implemented code that happens to use Python/ctypes as the implementation language and makes assumptions about the data-storage for the objects (e.g. that a string is internally a contiguous series of bytes, which is *not necessarily* true in PyPy). We'd need to find a mechanism in PyPy that would give us that direct memory-pointer access to be able to use it. Note: a compacting garbage collector (or anything else that can move memory locations) will cause problems there, so we may need to find a way to signal PyPy not to move a given object, and to use contiguous data-arrays for their storage. thanks a lot for any advice, renaud 0. PyOpenGL 3.x / The Python OpenGL® Binding http://pyopengl.sourceforge.net/ 1. opengl-programmable / a short step by step tutorial to OpenGL programmable pipeline http://bitbucket.org/rndblnch/opengl-programmable/ ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] (no subject)
Hey. I would suggest using array module. It allocates memory in a non-moving location and it's address can be found using buffer_info method. Cheers, fijal On Wed, Dec 1, 2010 at 3:18 PM, renaud blanch rndbl...@gmail.com wrote: hi, i'm trying to make some pyopengl [0] -based code [1] run on top of pypy. this is partially successful, but i need some advice to progress further. pyopengl 3.x makes use of ctypes to provide the opengl binding, and it works out of the box for simple functions (those that do not takes c-pointer to buffers of data as arguments). for the rest, the first issue is that pyopengl use two functions from the ctypes.pythonapi lib, namely PyString_AsString and PyBuffer_FromMemory. any advice on how to replace those functions to make them compatible with pypy? Mike Fletcher (pyopengl author) gave me some hints about that point: For the first issue, those are going to require some reworking, in essence those are C implemented code that happens to use Python/ctypes as the implementation language and makes assumptions about the data-storage for the objects (e.g. that a string is internally a contiguous series of bytes, which is *not necessarily* true in PyPy). We'd need to find a mechanism in PyPy that would give us that direct memory-pointer access to be able to use it. Note: a compacting garbage collector (or anything else that can move memory locations) will cause problems there, so we may need to find a way to signal PyPy not to move a given object, and to use contiguous data-arrays for their storage. thanks a lot for any advice, renaud 0. PyOpenGL 3.x / The Python OpenGL® Binding http://pyopengl.sourceforge.net/ 1. opengl-programmable / a short step by step tutorial to OpenGL programmable pipeline http://bitbucket.org/rndblnch/opengl-programmable/ ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] (no subject) Should have been : Next pypy-sync meeting tomorrow
Den 21/09/2005 kl. 18.31 skrev Anders Lehmann: Hi all, Next #pypy-sync meeting on freenode.net is tomorrow Thursday at 1pm as usual. Regular topics -- * activity reports (3 prepared lines of info) * resolve conflicts/blockers Here is my draft proposal of Topics of the week -- translate_pypy_new What more do want to do with this ? A pypy scrap-book ? Should we have a special place to collect press coverage, quotes, conference presentation, etc There remains about two weeks before the Paris Sprint, are there other areas that need refactoring which could be done before Paris ? Please propose additions and changes. See you tomorrow at 1 pm. Kind regards Anders (ale) ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev