Frank wrote: > Hi, > > I installed pyopengl (opengl for python) on my linux box and > everything works fine. But now I want to save the generated images as, > e.g., ps or eps. How can I do that and how can I adjust the resolution > (if necessary)? This is probably simple but for some reason I can not > find out how to do that. > > I appreciate every hint! > > Thanks, Frank > Hi Frank,
Take a look at the demos in OpenGL, particularly: OpenGL-ctypes/OpenGL/Demo/GLUT/tom/conesave.py which is a little GLUT application that renders into a GLUT windows and then allows you to save it. That's raster operation though (i.e. produces a PNG or JPG). Raster operations can only save a portion of the screen as rendered, so if you want a higher resolution image you need to make a larger window. If you want to get more advanced you can try using an off-screen buffer (pbuffer or MESA) for the rendering, which may (depending on implementation) allow for higher resolutions. If you want a true vector graphic (PS, EPS) you'll need to use something like GL2PS. http://www.geuz.org/gl2ps/ HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list