Re: [PyOpenGL-Users] crash on import on Mac OS X after xml-generation merge explained
Brought to you by:
mcfletch
From: rndblnch <rnd...@gm...> - 2014-01-29 14:16:56
|
Mike C. Fletcher <mcfletch <at> vrplumber.com> writes: > I looked into it, and there was, indeed, a problem with the ctypes > pointer handling. Basically we were getting pointer-to-pointer (i.e. > the address of the pointer variable) instead of the pointer's value when > doing a dataPointer() call on them. I've fixed that on bzr head, and > all of your samples now seem to run correctly on bzr head. What's weird > is that code hadn't changed; it seems that something higher-level meant > that the code-path just wasn't being executed in the old PyOpenGL releases. ok, indeed, it works for me at rev 656, thanks. > By the way, do you have a tutorial (text) somewhere connected with your > samples? no, unfortunately not. this is support material for an opengl class, but the documents are in french :( > And would you like the code linked into the PyOpenGL > documentation samples (i.e. when someone looks at the glXxxxPointer > functions they'd see a reference to your hg repository?) sure, i would be honored :) two quick notes: - there are two branches, python2 is python2.5+ compatible, and default is python2.6+ and python3+ compatible with a single code base - demo 10-gl3.2core.py is MacOSX specific as it uses the GLUT_3_2_CORE_PROFILE capability. i guess that freeglut also offers the possibility to open a 3.2 core compatible context, i will look into this to provide a platform independent version of this code. > I fixed an (unrelated) bug that was preventing the various configuration > flags (e.g. FULL_LOGGING) from running, and regenerated the > OpenGL_accelerate wrappers with the new Cython release. > > I *think* we're fairly close to a beta-1 release for PyOpenGL 3.1 at > this point. I still need to get some time to run the Windows tests and > re-run the Linux tests with the updated Cython wrappers. i have done some testing with python3 too, and got a couple of syntax errors because the keyword "in" is used as argument name by two functions. the patch below shows where it happens (the fix should probably done at the generator level though): === modified file 'OpenGL/raw/GL/EXT/vertex_shader.py' --- OpenGL/raw/GL/EXT/vertex_shader.py 2013-11-22 15:15:02 +0000 +++ OpenGL/raw/GL/EXT/vertex_shader.py 2014-01-29 10:48:57 +0000 @@ -217,7 +217,7 @@ def glShaderOp3EXT(op,res,arg1,arg2,arg3):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,_cs.GLenum,_cs.GLenum,_cs.GLenum) -def glSwizzleEXT(res,in,outX,outY,outZ,outW):pass +def glSwizzleEXT(res,_in,outX,outY,outZ,outW):pass @_f @_p.types(None,_cs.GLuint,_cs.GLenum,_cs.GLuint,ctypes.c_void_p) def glVariantPointerEXT(id,type,stride,addr):pass @@ -248,4 +248,4 @@ def glVariantusvEXT(id,addr):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,_cs.GLenum,_cs.GLenum,_cs.GLenum) -def glWriteMaskEXT(res,in,outX,outY,outZ,outW):pass +def glWriteMaskEXT(res,_in,outX,outY,outZ,outW):pass and a quick remark: a Logger instance named log is imported into the global namespace, so it shadows the math function when doing something like that: """ from math import log from OpenGL.GLUT import * """ perhaps it could be possible to exclude it from * import (by setting a __all__, or using _log as its name)? not very important, i know... thanks again, i will be happy to do more testing once 3.1b1 is out (pypy and pypy3:) renaud > > Thanks, > Mike > |