From: Chris S. <chr...@gm...> - 2007-06-13 04:10:29
|
> Hi, > > the pyode tuts are a charming way to make first contact, but at tutorial > three, I wasn't sure exactly _what_ I was seeing, until I replaced > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > with > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) > for the obvious reasons :-). > > Regards, > Thomas I don't know if this is related, but I've never been able to get tut3 working (and still can't). On Fedora 7, I get the following error: Traceback (most recent call last): File "/builddir/build/BUILD/Python-2.5/Modules/_ctypes/callbacks.c", line 206, in 'calling callback function' File "ode-tutorial-3.py", line 226, in _drawfunc draw_body(b) File "ode-tutorial-3.py", line 69, in draw_body glPushMatrix() File "/usr/lib/python2.5/site-packages/OpenGL/error.py", line 188, in glCheckError baseOperation = baseOperation, OpenGL.error.GLError: GLError( err = 1283, description = 'stack overflow', baseOperation = glPushMatrix, cArguments = () ) |
From: Nathaniel T. <loc...@ya...> - 2007-07-07 23:42:13
|
I found the bug, in line 75, in the function: def draw_body(body): """Draw an ODE body. """ x,y,z = body.getPosition() R = body.getRotation() rot = [R[0], R[3], R[6], 0., R[1], R[4], R[7], 0., R[2], R[5], R[8], 0., x, y, z, 1.0] glPushMatrix() glMultMatrixd(rot) if body.shape=="box": sx,sy,sz = body.boxsize glScale(sx, sy, sz) glutSolidCube(1) glPopMatrix() There is a call to: glScale(sx,sy,sz) there is no glScale, but glScaled and glScalef, note the "d" and "f" at the end of the function name. The illegal function call cause the function to exit without calling glPopMatrix() then the call back _drawfunc() is called which in turn calls draw_body() which calls glPushMatrix() and the process repeats without glPopMatrix() every being called. Nathaniel ____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC |
From: Ethan Glasser-C. <gl...@cs...> - 2007-07-09 03:06:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nathaniel Troutman wrote: > There is a call to: glScale(sx,sy,sz) there is no glScale, but glScaled and glScalef, note the "d" and "f" at the end of the function name. The illegal function call cause the function to exit without calling glPopMatrix() then the call back _drawfunc() is called which in turn calls draw_body() which calls glPushMatrix() and the process repeats without glPopMatrix() every being called. Hi, Thanks for the analysis! A user was having problems with this program before but I couldn't figure out why. What version of pyopengl are you running? I'm running 2.0.1.09 and I get: $ python Python 2.4.4 (#2, Apr 26 2007, 00:02:45) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import OpenGL.GL >>> OpenGL.GL.glScale <built-in function glScaled> >>> OpenGL.GL.glScaled <built-in function glScaled> I'll probably move it to glScaled, but I'm really curious what version you have that doesn't have this alias in it. Ethan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkaYfhRlgoLPrRPwRAgOtAJ9ufeIxmN8ZgXkOyRIRGXTr7LkFcQCZAalP 1v3vI5RvIMQk0y9MFVnYTKo= =C9xK -----END PGP SIGNATURE----- |
From: nick k. <nk...@ze...> - 2007-07-09 14:29:22
|
I saw this when I moved to PyOpenGL 3 which evidently uses ctypes, and from my quick perusal of the OpenGL reference, there isn't any alias for glScale in the library. But happily I think this was the only change I had to make in my PyOpenGL code when moving to version 3...and the installation was _much_ simpler. nick On Jul 8, 2007, at 11:06 PM, Ethan Glasser-Camp wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Nathaniel Troutman wrote: >> There is a call to: glScale(sx,sy,sz) there is no glScale, but >> glScaled and glScalef, note the "d" and "f" at the end of the >> function name. The illegal function call cause the function to >> exit without calling glPopMatrix() then the call back _drawfunc() >> is called which in turn calls draw_body() which calls glPushMatrix >> () and the process repeats without glPopMatrix() every being called. > > Hi, > > Thanks for the analysis! A user was having problems with this program > before but I couldn't figure out why. > > What version of pyopengl are you running? I'm running 2.0.1.09 and > I get: > > $ python > Python 2.4.4 (#2, Apr 26 2007, 00:02:45) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import OpenGL.GL >>>> OpenGL.GL.glScale > <built-in function glScaled> >>>> OpenGL.GL.glScaled > <built-in function glScaled> > > I'll probably move it to glScaled, but I'm really curious what version > you have that doesn't have this alias in it. > > Ethan > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGkaYfhRlgoLPrRPwRAgOtAJ9ufeIxmN8ZgXkOyRIRGXTr7LkFcQCZAalP > 1v3vI5RvIMQk0y9MFVnYTKo= > =C9xK > -----END PGP SIGNATURE----- > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user |
From: Nathaniel T. <loc...@ya...> - 2007-07-10 02:30:43
|
I'm using PyOpenGL-3.0.0a6 on Mac OSX 10.4.9 If I import OpenGL.GL this is what I get for the functions from a python terminal >>> OpenGL.GL.glScale Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'module' object has no attribute 'glScale' >>> OpenGL.GL.glScaled <CFunctionType object at 0x16cece0> >>> OpenGL.GL.glScalef <CFunctionType object at 0x16ced50> So it must be an OpenGL 3 problem as I have a friend at work for whom the PyODE tutorial worked fine, but he was on windows and I don't know what version of PyOpenGL he was using. Thanks for work, got a question but it should be in a separate message. Nathaniel ____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC |
From: Diez B. R. <de...@we...> - 2007-06-13 09:10:08
|
On Wednesday 13 June 2007 06:10, Chris Spencer wrote: > > Hi, > > > > the pyode tuts are a charming way to make first contact, but at tutorial > > three, I wasn't sure exactly _what_ I was seeing, until I replaced > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE) > > with > > glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) > > for the obvious reasons :-). > > > > Regards, > > Thomas > > I don't know if this is related, but I've never been able to get tut3 > working (and still can't). On Fedora 7, I get the following error: > > Traceback (most recent call last): > File "/builddir/build/BUILD/Python-2.5/Modules/_ctypes/callbacks.c", > line 206, in 'calling callback function' > File "ode-tutorial-3.py", line 226, in _drawfunc > draw_body(b) > File "ode-tutorial-3.py", line 69, in draw_body > glPushMatrix() > File "/usr/lib/python2.5/site-packages/OpenGL/error.py", line 188, > in glCheckError > baseOperation = baseOperation, > OpenGL.error.GLError: GLError( > err = 1283, > description = 'stack overflow', > baseOperation = glPushMatrix, > cArguments = () > ) Looks as if the glPushMatrix is missing a glPopMatrix somewhere. Shouldn't be too hard to fix, but I don't have the code here. Diez |
From: Ethan Glasser-C. <gl...@cs...> - 2007-06-13 22:50:25
|
Diez B. Roggisch wrote: > On Wednesday 13 June 2007 06:10, Chris Spencer wrote: >> I don't know if this is related, but I've never been able to get tut3 >> working (and still can't). On Fedora 7, I get the following error: >> >> Traceback (most recent call last): >> File "/builddir/build/BUILD/Python-2.5/Modules/_ctypes/callbacks.c", >> line 206, in 'calling callback function' >> File "ode-tutorial-3.py", line 226, in _drawfunc >> draw_body(b) >> File "ode-tutorial-3.py", line 69, in draw_body >> glPushMatrix() >> File "/usr/lib/python2.5/site-packages/OpenGL/error.py", line 188, >> in glCheckError >> baseOperation = baseOperation, >> OpenGL.error.GLError: GLError( >> err = 1283, >> description = 'stack overflow', >> baseOperation = glPushMatrix, >> cArguments = () >> ) > > Looks as if the glPushMatrix is missing a glPopMatrix somewhere. Shouldn't be > too hard to fix, but I don't have the code here. In the copies of tutorial3 that I have, there's only one call to glPushMatrix and then one to glPopMatrix (lines 69 and 75, respectively). The source is at http://pyode.sourceforge.net/tutorials/tutorial3.py , and I don't get this kind of crash. Chris, where did you get the tutorial from? Does it have both PushMatrix and PopMatrix calls? Ethan |