Re: pyopengl and pypy
"Mike C. Fletcher" <[email protected]> Mon, 06 Dec 2010 22:19:37 -0500
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net