Re: [PyOpenGL-Devel] pyopengl and pypy
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2010-12-07 03:20:13
|
On 10-12-02 08:45 AM, rndblnch wrote: ... > def dataPointer(value): > return ctypes.cast(ctypes.c_char_p(value), ctypes.c_void_p).value > I don't see any documentation on this for CPython, for PyPy this apparently is going to create a copy of the data in value? My quick test says on CPython it doesn't copy the data, so I've swapped it into the code. > PyBuffer_FromMemory can be implemented as (not tested though, since it's > only used in experimental code for vbos): > def PyBuffer_FromMemory(address, length): > return buffer((ctypes.c_char * length).from_address(address)) > I've updated to use that one as well. > the whole thread is there for reference: > <http://codespeak.net/pipermail/pypy-dev/2010q4/006452.html> > > > 2) the second issue (missing _CDada_intput) is from pypy. the good news is that > it has already been fixed by Amaury Forgeot d'Arc in the fast-forward branch > (aiming at cpython 2.7 compatibility). the patch (requires some adaptation to > apply on pypy-1.4) can be found there: > <http://codespeak.net/pipermail/pypy-svn/2010-November/045106.html> > Hmm, that branch doesn't build on my machine, so I can't test the changes. > so far, i have managed to partially run the programs of my small opengl > tutorial, i.e. a sample program that use most of the functionalities of the > fixed pipeline and that is evolved step by step into a shader based > implementation. what runs for the moment (with minor errors): > - 01-direct.py (direct rendering, some geometry + 3d texture) > - 02-displaylist.py > - 03-array.py (use of Vertex/.../NormalPointer) > - 04-vbo.py (idem + VBOs to pass the data) > what does not run: the rest that uses shaders, but i'm pretty confident it's a > minor issue (wrong types in glShaderSource arguments) > > the programs are based on pyopengl and can be found here: > <http://bitbucket.org/rndblnch/opengl-programmable/> > I'll try to find some time to play with them. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |