Re: [PyOpenGL-Users] freeglut: Unable to create direct context rendering
Brought to you by:
mcfletch
From: JoN <jo...@we...> - 2006-09-25 01:22:34
|
This code works for me, stolen from the NeHe tutes: glutInit(sys.argv) # Select type of Display mode: # Double buffer # RGBA color # Depth buffer # Alpha blending glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA= ) # get a 640 x 480 window glutInitWindowSize(640, 480) # the window starts at the upper left corner of the screen glutInitWindowPosition(0, 0) # Open a window window =3D glutCreateWindow("Jeff Molofee's GL Code Tutorial ... NeHe= '99") Quoting Fabrizio Pollastri <pol...@ir...>: > Hi all, >=20 > when I run this python script on a Debian/Linux Etch >=20 > ---- > #!/usr/bin/python >=20 > from OpenGL.GLUT import * > import sys >=20 > glutInit(sys.argv) > glutCreateWindow("dri") > glutMainLoop() > ---- >=20 > I get the warning >=20 > " > freeglut (./dri.py): Unable to create direct context rendering for=20 > window 'dri' > This may hurt performance. > " >=20 > and all my python code using OpenGL is slow. >=20 > On the contrary the equivalent C code >=20 > ---- > #include <GL/glut.h> >=20 > int main (int argc, char **argv) { > glutInit (&argc, argv); > glutCreateWindow ("test"); > glutMainLoop (); > return 0; > } > ---- >=20 > runs fine. >=20 > The command "glxinfo | grep render" > returns >=20 > " > direct rendering: Yes > OpenGL renderer string: Mesa DRI G400 20050609 AGP 1x > " >=20 > and standard demos (glxgears) runs fine using DRI. >=20 > Any help will be appreciated. >=20 >=20 > Regards, > F. Pollastri. >=20 > -----------------------------------------------------------------------= -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share= your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users >=20 -------------------------------------------------------------------- Come and visit Web Prophets Website at http://www.webprophets.net.au |