Re: [PyOpenGL-Users] Problem with pyopengl
Brought to you by:
mcfletch
From: Alejandro S. <as...@gm...> - 2011-12-19 16:15:55
|
Hello Alfonso, This might sound obvious, but have you enabled z-buffering? If so, what depth comparison function are you using? Alejandro.- 2011/11/29 Alfonso de la Osa <ar...@gm...> > Hi, > > I'm having troubles with pyopengl (or glut) > when trying to render a glut solid box or glut solid sphere > > > I tried the pyode test and the boxes were wrong. > The faces seem to be invisible sometimes and the render don't show > objects ordered properly in depth. > Then I added spheres and they were erroneously represented too. > > I've taken 2 screenshots: > > http://imgur.com/a/JBm8u > > # draw_body > 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": > > glShadeModel(GL_FLAT) > sx,sy,sz = body.boxsize > glScalef(sx, sy, sz) > glutSolidCube(1) > elif body.shape=="sphere": > > glShadeModel(GL_FLAT) > glutSolidSphere(body.radius, 10, 10) > glPopMatrix() > > What can I do to solve this? > > -- > > Alfonso > > > > > > ------------------------------------------------------------------------------ > Learn Windows Azure Live! Tuesday, Dec 13, 2011 > Microsoft is holding a special Learn Windows Azure training event for > developers. It will provide a great way to learn Windows Azure and what it > provides. You can attend the event by watching it streamed LIVE online. > Learn more at http://p.sf.net/sfu/ms-windowsazure > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > -- http://alejandrosegovia.net |